Bug #3500 update syntax

Submitted: 18 Apr 2004 23:49 Modified: 19 Apr 2004 7:03
Reporter: Nhat Le Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version: OS:
Assigned to: CPU Architecture:Any

[18 Apr 2004 23:49] Nhat Le
Description:
Hi. I'm having problems with updating a table named char. I have a program that can create tables named char.  When i use the mySQL query: update char set login=5 where login>2; i always get an error.  I know i get this error because char is a data type.  However, if I switch the query to: update 'char' set login=5 where login>2;    I still get an error!  I always get error 1064 which is a syntax error

other errors include:  rename table 'table1' to 'table2';

Essentially any table names enclosed in single quotes gives me a 1064: syntax error

I don't want to have to change my table names just to execute some queries.

How to repeat:
rename table 'table1' to 'table2';       error 1064
update 'char' set money=0 where login>100;
update char set money=0 where login>100;

Suggested fix:
Change it so that all SQL functions/commands allow table names or any columns to be enclosed in single quotes please.  Thank you.

so these queries should work:

rename table 'table1' to 'table2'; 
update 'char' set money=0 where login>100;
[18 Apr 2004 23:51] Nhat Le
update 'char' set money=0 where login>100;
update char set money=0 where login>100;

typos!!! should be:

update 'char' set login=0 where login>100;
update char set login=0 where login>100;
[19 Apr 2004 0:03] Nhat Le
Never mind i'm an idiot, i used the wrong chars to enclose the table names.... I used ''  rather than ``.   I'm very new to the SQL language sorry for this stupid bug post. =/
[19 Apr 2004 0:04] Nhat Le
please delete... it's not a bug post!
[19 Apr 2004 7:03] Sergei Golubchik
closed as "not a bug"

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.