The rephrased title is: MySQL table name using double quotes
P粉851401475
P粉851401475 2023-10-24 22:39:00
0
1
610

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粉851401475
P粉851401475

reply all(1)
P粉071559609

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!