Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table name which is a key word

Status
Not open for further replies.

DarwinIT

Programmer
Apr 25, 2008
142
US
I have finally gotten a database created and built and an ODBC connection working to the database - and boom - the first table I need to read is named call (which appears to be reserved word in MySQL?) Is there a syntax (SQL Server uses [tablename] but that won't work. There must be some way because the vendor is accessing the data in this table.

 
Found it it is the single quote key to the left of the 1 key at the top left of the keyboard. Or you can specify databaseName.tablename to get around the problem.
 
If you want your queries to work in both SQL server and MySQL, you can run MySQL in ANSI mode (set this in my.cnf) and use the standard way of escaping identifiers: double quotes.
Problem with this, alas, is that MySQL only recognizes it when running in ANSI mode.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top