Setting isql Client Dialect
Go Up to Command-line isql Tool
To use isql to create a database in a particular dialect, first set isql to the desired dialect and then create the database. You can set isql dialect the following ways:
- On the command line, start
isqlwith option-sql_dialectn, where n is 1, 2, or 3:
isql -sql_dialect n
- Within an
isqlsession or in a SQL script, include the following statement:
SET SQL DIALECT n;
isql dialect precedence is as follows:
- Lowest: Dialect of an attached version 6 or later database
- Next lowest: Dialect specified on the command line
- Next highest: Dialect specified during the session
- Highest: Dialect of an attached Version 5 database (=1)
In InterBase, isql has the following behavior with respect to dialects:
- If you start
isqland attach to a database without specifying a dialect,isqltakes on the dialect of the database. - If you specify a dialect on the command line when you invoke
isql, it retains that dialect after connection unless explicitly changed. - When you change the dialect during a session using SET SQL DIALECT n,
isqlcontinues to operate in that dialect until it is explicitly changed. - When you create a database using
isql, the database is created with the dialect of theisqlclient; for example, ifisqlhas been set to dialect 1, when you create a database, it is a dialect 1 database. - If you create a database without first specifying a dialect for the
isqlclient or attaching to a database,isqlcreates the database in dialect 3.
The statements above are true whether you are running
isql as a command-line utility or accessing it through IBConsole.
- Important: Any InterBase
isqlclient that attaches to a Version 5 database resets to dialect 1.