Bug #51969 SHOW CREATE TABLE generates a statement with pairs of single quote (“'”)
Submitted: 11 Mar 2010 20:23 Modified: 7 Apr 2010 19:22
Reporter: Samir Abboushi Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.16 Beta Revision 5249 OS:Windows (Vista 64)
Assigned to: CPU Architecture:Any
Tags: SHOW CREATE TABLE

[11 Mar 2010 20:23] Samir Abboushi
Description:
SHOW CREATE TABLE tablename SQL QUERY generates a statement with pairs of single quotes (“'”) surrounding whatever is quoted.

How to repeat:
execute a SHOW CREATE TABLE tablename query

Note that in the resulting CREATE TABLE query statement, values which are quoted are surrounded by PAIRS of single quotes.  i.e. (“''”) instead of (“'”).

e.g.

  `Col2` int(11) NOT NULL DEFAULT ''0'',

SQL Editor flags this line with a red X until the extra single quotes are deleted.

Suggested fix:
Enclose with single quotes, not a pair of single quotes.
[11 Mar 2010 21:28] MySQL Verification Team
Thank you for the bug report.
[11 Mar 2010 22:21] Samir Abboushi
Clarification: The 'Create Table' Column of the 'Results' tab correctly shows that values are enclosed with single quotes.  

Right clicking on the resulting 'Create Table' statement in the 'Results' tab, and selecting 'Copy field content' seems to be where the duplicate single quotes are added (i.e. pasting will show the duplicate single quotes)
[12 Mar 2010 4:24] Peter Laursen
Quotes are only required for strings and should be avoided totally with numbers.
[7 Apr 2010 19:22] Sergei Tkachenko
Please see the bug #51041 for solution.