I'd like to address a SQLyog bug that I could not find reference to in the forum or Google Group, and that is the generated SQL from “Table > Paste SQL Statements”. When the table you are working with contains column(s) named after a MySQL reserved word, the generated SQL itself does not run without throwing an error (error code: 1064).
Consider this table:
CREATE TABLE `example` (
`condition` ENUM('example_value') NOT NULL,
`value` VARCHAR(75) NOT NULL
) ENGINE=MYISAM;If you were to perform “Table > Paste SQL Statements > SELECT” (Alt + Shift + S), what you get it is:
SELECT CONDITION, VALUE FROM db_name.example LIMIT 0, 75;Unfortunately, running this generated SQL throws Error code: 1064 🙁
If it were to generate the following, this could be prevented:
SELECT `condition`, `value` FROM db_name.example LIMIT 0, 75;NOTE: In this case, the table name itself is also a reserved word. It does not error because of the database concatenation. At a minimum, it would be ideal if the column references in the generated SQL were automatically escaped via `backticks`, or at least the reserved words to prevent erroneously generated SQL.
You may want to go as far as escaping the database and table names as well, in the event they are reserved words, or perhaps contain spaces:
CREATE TABLE `my example` (
`condition` ENUM('example_value') NOT NULL,
`value` VARCHAR(75) NOT NULL
) ENGINE=MYISAM;Generates this erroneous SQL:
SELECT CONDITION, VALUE FROM db_name.my EXAMPLE LIMIT 0, 75;…ideally it would be this:
SELECT `condition`, `value` FROM `db_name`.`my example` LIMIT 0, 75;Have any of you ran into this scenario before? The only current way around it with even the most recent build of SQLyog is to prevent creating (or working with) schemas that use MySQL reserved words…often however, this is not always an option.
Keep up the great work on this amazing tool! Next step? SQLyog for Mac OS X 😉
Please see this setting.
[attachment=1316:backquotes.jpg]
Did it help?
- Posts
Recent Topics
Sqlyog Mac Os X 10.10
Recent Replies
Sqlyog Mac Os X 10.7
I've been using SQLyog very happily and now I've switched to OS X. Running Windows on a virtual machine works, but it would be great not to have to run a VM. To be able to edit results is also great, but one of my reasons to use SQLyog was its ability to copy and synchronize databases on remote machines. However there still are two different ways to run SQLyog on a Mac: 1) Using a Wine-port for Mac OS-X. 2) Using a virtualization manager. Using a Wine-port: Read here our general FAQ on SQLyog with Wine. A free Wine port for mac exists named 'darwine' (as well as commercial ports). But note that for Mac OS-X specifically there is a. Download SQLyog Community Edition x64 database management Windows 7 Freeware - Free Windows. Navicat Essentials for SQL Server (Mac OS X). SQLyog Community Edition x64 12.4.3. SQLyog MySQL GUI x64 is the most powerful MySQL manager and admin tool. Freeware Free Servers download - Best Software 4 Download - page 5 software windows. Workbench's user interface is regarded by a lot of users as unintuitive and hard to use. It seems cluttered and hard to get used to. The left side of the application has several sections (which you get to choose which to open) with several tools for each.
Sqlyog Mac Os X 10.13
- on Copy All Rows To Clipboard
- on SSH Error: FATAL ERROR: Couldn’t agree a key exchange algorithm
- on Database Synchronization Wizard: Definition mismatch for ‘bigint’ column
- on sja commandline fails
- on Database Synchronization Wizard: Definition mismatch for ‘bigint’ column