Need for automatic "where" concatenation
When you are working with SQL it is easy to forget the "where" statement in update, delete. If this happens in production it could be devastating. It would be a nice feature to automatic add the "where" statement in for "delete" and/or "update".
Thank you for the suggestion.
Prompt already provides execution warnings when you use an UPDATE or DELETE statement without a WHERE clause and code analysis also flags this as an issue. Please see the comments below for other options for solving this issue.
You can get the latest version of SQL Prompt, including all of the above, from http://www.red-gate.com/products/sql-development/sql-prompt/.
Thank you for your help!
Kind regards,
The Prompt Team
-
Ryan commented
To further illustrate:
http://i.imgur.com/1xLVTE4.png -
Ryan commented
Why not change your SQL snippets..UF to UPDATE FROM to UPDATE FROM WHERE and make a df snippet DELETE FROM WHERE? bam, done.
-
Ronny Röe commented
Brilliant!
-
ebboT commented
That's great!
-
Anonymous commented
It is great! It's better to be safe than sorry when working with a production database!