Page 1 of 1

Can't compare when reserved words used

Posted: Tue 21 Nov 2017 13:08
by silid
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

Re: Can't compare when reserved words used

Posted: Fri 24 Nov 2017 14:45
by .jp
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.