search

Home  >  Q&A  >  body text

The rephrased title is: MySQL table name using double quotes

I am executing a mysql query like this:

Select * from "User";

It returns:

There is an error in your SQL syntax; check the manual for your MySQL server version for the correct syntax to use near "User" on line 1

Error with double quotes", can I leave the select statement unchanged and let mysql handle the double quotes?

P粉851401475P粉851401475428 days ago753

reply all(1)I'll reply

  • P粉071559609

    P粉0715596092023-10-25 20:17:32

    Excerpted from this article:

    SET GLOBAL SQL_MODE=ANSI_QUOTES;

    When I personally test, I must do this:

    SET SQL_MODE=ANSI_QUOTES;

    I think there is no other way.

    reply
    0
  • Cancelreply