Here is a problem that we had on a recent project that we were doing maintenance on. The code had some queries with a table called as “user”. The code works fine on the production server but gave an error on our development server. The fix? Put brackets around the table name in all the queries.
select name from [user]
select name from user
We had different versions of SQL Server on the two boxes and user is now a reserved word on the development box version.
We figure out what words are reserved using Pete Freitag's reserved word tool at: