SQL Reserved Key Words Checker Tool
I just whipped together a tool for checking for reserved sql words. The tool checks against SQL Server 2000, MySQL 5.0, PostgreSQL 8.0, Oracle 10g, ODBC, and SQL Server Future Keywords list.
It is a good idea to make sure you db schema's will work ok across multiple db platforms, so the tool will show you which platforms a word is reserved on.
- SQL to Select a random row from a database table - September 14, 2005
- INFORMATION_SCHEMA Support in MySQL, PostgreSQL - February 18, 2008
- Returning TOP N Records - April 18, 2003
- Top 10 Reserved SQL Keywords - October 28, 2008
- Backwards LIKE Statements - January 10, 2007
Keywords in the PostgreSQL grammar are divided into several groups, and the so-called "unreserved" keywords are actually available for use as table or column names, or in any other context as any non-keyword is. The grammar needs them as keywords because they're used in some non-ambiguous context, but for an application, there is no disinction between an unreserved keyword and a word that's not a keyword at all. For example, "CHECKPOINT" is an unreserved keyword because there's a CHECKPOINT command to perform a checkpoint, but you can create a table called CHECKPOINT or column with no problem.
An up-to-date list of keywords can be found at http://www.postgresql.org/docs/8.4/interactive/sql-keywords-appendix.html. You should ignore all the keywords listed as "non-reserved" (or blank). Even better, you could distinguish the classes of "reservedness" in the tool, but you should leave out the non-reserved ones anyway.
I plan to add a tool checking a schema for reserved keywords into the Doctrine ORM (www.doctrine-project.org) and having a knowledgeable database as backend is better than maintaining our own one.
You would be mentioned with URL and credits also :)
- Burst Throttling on AWS API Gateway Explained
- How to Resolve Java HTTPS Exceptions
- Tomcat Java 10 on Windows CreateJavaVM Failed
- SameSite Cookies with IIS
- Facebook API Now Requires Review for user_friends Permission
- Docker Container exited with code 137
- Why is my cron.daily script not running?
- Announcing FuseGuard Version 3