Difference between revisions of "SET SQLDIALECT"
From Lianjapedia
Yvonne.milne (Talk | contribs) (→Description) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Configure SQL statement syntax | Configure SQL statement syntax | ||
− | |||
==Syntax== | ==Syntax== | ||
− | SET | + | SET SQL[DIALECT] TO RECITAL | VFP | MYSQL |
− | + | ||
==See Also== | ==See Also== | ||
− | + | [[:Category:SQL|SQL]] | |
− | + | ||
==Description== | ==Description== | ||
− | Where | + | Where Lianja, MySQL and VFP differ in their SQL syntax, the SET SQLDIALECT command can be used to select the syntax to be used. |
− | By default, SET SQLDIALECT is set to | + | By default, SET SQLDIALECT is set to VFP. Since the SET SQLDIALECT setting affects program compilation, it should be set prior to compilation rather than in a program itself, for example in a config.db configuration file. |
====;==== | ====;==== | ||
− | The semi-colon, ’;’, is used to terminate SQL statements when SQLDIALECT is set to MYSQL. It is used as a line continuation character when SQLDIALECT is set to VFP or RECITAL . | + | The semi-colon, ’;’, is used to terminate SQL statements when SQLDIALECT is set to MYSQL. It is used as a line continuation character when SQLDIALECT is set to VFP or RECITAL. |
====.sql programs==== | ====.sql programs==== | ||
When a program with a ’.sql’ file extension is run, SQLDIALECT is automatically set to MYSQL and SET SQL is set ON. | When a program with a ’.sql’ file extension is run, SQLDIALECT is automatically set to MYSQL and SET SQL is set ON. | ||
− | |||
==Example== | ==Example== | ||
Line 28: | Line 24: | ||
set sql to mysql | set sql to mysql | ||
− | |||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Set_Commands|SQLDIALECT]] | [[Category:Set_Commands|SQLDIALECT]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
− |
Latest revision as of 12:49, 17 December 2020
Purpose
Configure SQL statement syntax
Syntax
SET SQL[DIALECT] TO RECITAL | VFP | MYSQL
See Also
Description
Where Lianja, MySQL and VFP differ in their SQL syntax, the SET SQLDIALECT command can be used to select the syntax to be used.
By default, SET SQLDIALECT is set to VFP. Since the SET SQLDIALECT setting affects program compilation, it should be set prior to compilation rather than in a program itself, for example in a config.db configuration file.
;
The semi-colon, ’;’, is used to terminate SQL statements when SQLDIALECT is set to MYSQL. It is used as a line continuation character when SQLDIALECT is set to VFP or RECITAL.
.sql programs
When a program with a ’.sql’ file extension is run, SQLDIALECT is automatically set to MYSQL and SET SQL is set ON.
Example
set sqldialect to vfp set sql to mysql