Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

If I wanted to make a suggestion to a change to how the UPDATE statement works in SQL, how would I go about it?

Is there a website for the next standard?

I googled, but just kept getting the Wikipedia page.

share|improve this question
2  
SQL has been stable for years now, I don't think there will be a next standard –  ratchet freak Jan 17 '13 at 11:39
1  
Depending on the database you're using, what you're trying to accomplish can be achieved with triggers. Better would be to review your code and make sure there's a WHERE clause in statements that need them. –  Blrfl Jan 17 '13 at 11:40
2  
I understand your frustration with this accident, but advice you to get used to it like everyone else. Chances are very low your change would be considered, for the sake of backward compatibility. Also, current behavior is consistent (DELETE FROM <table>). BTW, a standard might exist on paper, but in practice different implementations of it have slightly different syntax anyway. The last thing we'd want is that we'll have ALL in some but not all implementations, resulting in even more diverse behavior. So triggers or perhaps a good SQL editor that gives a warning. –  Thijs van Dien Jan 17 '13 at 11:40
1  
There already is a syntax that is explicit that you want to update everywhere: update table set column=newvalue where 1. Now it's just a matter of putting in a layer that will reject any update or delete statements without where into your database access layer (DAL). –  Jan Hudec Jan 17 '13 at 12:02
1  
"With a DELETE statement you know you are doing something destructive, but with an update statement the destruction happens by accident, not by design." - what? DELETE deletes, UPDATE updates, what's not to know? –  AakashM Jan 17 '13 at 13:17
show 7 more comments

2 Answers

up vote 6 down vote accepted

There are a couple of means to do this.

  1. Petition ISO
  2. Persuade your favorite DB vendor
  3. Make the change yourself

Petition ISO
You can petition your request to the appropriate committee(s) at ISO. The Wikipedia article you linked provides the ISO specification numbers and therefore which committees.

Be forewarned that you'll probably need to volunteer on the committee(s) and / or put in a lot of work to champion this change. Having indirectly worked with standards committees before, I can assure you that nothing is straightforward and nothing occurs unless the change has a champion.

Persuade your favorite DB vendor
The DB vendors such as IBM, Microsoft, and Oracle are not obligated to code their databases against the SQL standard. Last I checked, none of them complied completely with the latest SQL standard anyway. If you have sufficient clout with the vendors, you may be able to persuade them to implement the change you are requesting. I would start with your local sales representative in this case.

All of the major DB vendors are (or should be) involved in the standardization process. If you can convince one of them to make the change for you, then they should be able to champion the change at the next evolution of the standard.

Make the change yourself
All that having been said, you're more than welcome to pull a copy of the source for your favorite open source DBMS and make the change yourself. While this will likely require the most amount of effort on your part, it also has the best odds of actually seeing the light of day. Even if the project maintainers reject your enhancement, you can always run your version of the database and have the change you have requested.

If your change is adopted by the project and it proves popular, it could eventually find its way into the next version of the standard.

share|improve this answer
add comment

Well that standards are controlled by ANSI, so I would suggest you start there.

http://www.ansi.org/

Although as already said getting it in to the standards is unlikely, as mentioned from others there are ways of doing this already if you want to be explicit and more importantly your change wouldn't be backwards compatible.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.