Do we hv any command to prevent the execution of update/delete SQL w/o “Where” Clause?
Do we hv any command to prevent the execution of update/delete SQL w/o “Where” Clause?
Comments
Add any false statement in where clause e.g add where 1 = 0
Thanks
Your goal is to check the syntax of Sql?
Michael,
What's the use case? You might be able to design something with SQL triggers but that feels ripe for complications. You can find people discussing this kind of solution (using triggers) for other databases online, and from what I can tell people generally agree this is a messy option.
If the idea is that people are accidentally executing improper SQL commands, perhaps I would tackle this from a training perspective, or by restricting SQL commands to a more limited audience.
The use case is to prevent people executing wrong SQL. Any more we can do besides training or role control?
Role control seems to me the most logical solution.
That is his goal!