Q:

MySQL server version for the right syntax to use near WHERE 1=0' at line 1

I am trying to connect to mySQL database using MySQL 5.2 ODBC Driver, tested the connection and it was successful but when I am running select queries on the database tables getting below error - 

The service was unable to retreive the results of the query. ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.1.40-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"dbtmsprod02"."twe_planning" ) T WHERE 1=0' at line 1 

Here is my SQL query :
Select "plan_id", "plan_desc", "plan_status" From "dbtmsprod02"."twe_planning" 

I am little to new this area, any help would be highly appreciated.
Thanks
Prabhu

A:

By default, MySQL is non-standard in that it uses double-quotes for string delimiters (identical to single-quotes).  Standard SQL uses double-quotes in the way you are using them, as delimiters for table and column identifiers.
You can use the SQL mode to make MySQL conform to ANSI SQL:
SET SQL_MODE=ANSI_QUOTES

Or you can use MySQL's default identifier delimiter, the back-tick:
Select `plan_id`, `plan_desc`, `plan_status` From `dbtmsprod02`.`twe_planning`

Or you could just take out the quotes, because none of your identifiers need them.  Delimited identifiers are required if your identifiers contain special characters, whitespace, or SQL reserved words.

