Can't compare when reserved words used

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
silid
Posts: 1
Joined: Tue 21 Nov 2017 13:01

Can't compare when reserved words used

Post by silid » Tue 21 Nov 2017 13:08

Using Studio for MySQL data comparisons fail with sql error when the column names are reserved words.

I presume the queries don't backtick the column names.

For example:

Code: Select all

Cannot compare jira_default.AO_102D86_SUBCOMPONENT with jira_default.AO_102D86_SUBCOMPONENT on INFORMATION_SCHEMA.127.0.0.1.
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 'VIRTUAL, VIRTUAL_CMP
FROM jira_default.AO_102D86_SUBCOMPONENT ORDER BY ID' at line 1
Virtual was added as a reserved word in 5.7.6

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: Can't compare when reserved words used

Post by .jp » Fri 24 Nov 2017 14:45

Hello,

Thanks for the post.

Please tell us the additional information:
1) The CREATE definition of the tables with columns 'VIRTUAL' and 'VIRTUAL_CMP'. Please use the following statement:

Code: Select all

SHOW CREATE TABLE your_table_name;
2) The server version you are using. Please use the following statement:

Code: Select all

SELECT version();
or

Code: Select all

SELECT @@version;
Best Regards.

Post Reply