I'm designing a database. Now it's on MySQL, but tomorrow could migrate on another DBMS. So I have to pay attention not to use reserved words (for MySQL and possibly for any other DBMS) as field names. And I don't want to use reserved word as field names, wrapped in quotes or square brackets!
Is there a site where I can find all reserved words for every DBMS? Or at least for the most used ones. It would be great if would exist a tool where you put a word and it gives you all DBMS for which it is a reserved word, if any.
If there is no online reference or tool of this kind, we could recollect a list of links for the pages of reserved words of every DBMS. Thanks a lot!
WOW... I found this online tool: Reserved Word Search.
It's valid both for DBMS and programming languages. It seems quite up-to-date.
Yes. I found this site has an on-line tool to check if the entered word is the reserved word of SQL Server, MySQL, PostgreSQL, Oracle, and DB2 etc.: SQL Reserved Words Checker.
But it seems that its data is not updated to the latest version .You may collect the reserved words for different database 's latest version and build your own "reserved word" database.
This is the official reserved words list for some main databases :
The V$RESERVED_WORDS data dictionary view provides additional information on all keywords, including whether the keyword is always reserved or is reserved only for particular uses. Please refer to Oracle Database Reference for more information.
Here is another page, where you can check if some word match reserved word in SQL Server, MySQL, PostgreSQL, Oracle, DB2, ANSI SQL or ODBC:
There are also these pages from Mimer website: SQL Reserved Words Overview and Vendor-reserved Words
And a long list of reserved SQL keywords from Drupal site.
This Drupal.org site made a partial list of over 800 words.
来源:https://stackoverflow.com/questions/8339396/all-reserved-words-of-every-dbms