Using the GUI

ID #1099

Can I use functions with SQLyog DATA and RESULT panes?

 

Yes!


This has been supported since version 5.12. Also read here about KEYWORDS support in SQLyog GUI.


If you enter a string followed by the '(' character SQLyog will check the keywords.db database file for a 'match'. If there is a 'match' SQLyog will not enclose the value for that column with quotes when generating an INSERT or UPDATE statement - and MySQL will execute the function.

 

There are a few points to note:

* the name of the function must start on the first character in the grid-cell (or the BLOB-viewer). Entering ' concat('a','b')' (note the leading SPACE character) inserts literally ' concat('a','b')' whereas 'concat('a','b')' inserts 'ab'.

* to enter the name of a function as a literal you must enclose in backqoutes. To insert now() as a literal you must then enter ´now()´.

* be aware that if you have entered ´now()´, the grid will show now(). If you next UPDATE that row, now() will be interpreted as a function - not as a literal. You can 'work around' this by working from the RESULT pane with a SELECT statement that does not include the column affected.

* it is your own responsibility to enter the correct syntax for the function. SQLyog does not parse. It simply returns any MySQL server error that will occur as a result of incorrect syntax.

 

Starting from SQLyog version 5.2 this feature can be turned off in 'preferences' if you do not want it.

The functions list in the keywords.db file is used by SQLyog for syntax highlighting in the editor and for autocomplete as well.

 

Tags: -

Related entries:

Last update: 2009-02-16 05:32
Author: Peter Laursen
Revision: 1.1

Digg it! Print this record Send FAQ to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this FAQ:

Average rating: 1 out of 5 (1 Votes )

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ