The SET commands enable you to view and change things about the isql environment. Some are available in scripts.
SET AUTODDL specifies whether DDL statements are committed automatically after being executed or committed only after an explicit COMMIT. It is available in scripts.SQL> SET AUTODDL [ON | OFF] ; /* default is ON */
SET AUTO (with no argument) simply toggles AUTODDL on and off.
SET BLOBDISPLAY specifies both the subtype of BLOB to display and whether BLOB data should be displayed.SQL> SET BLOBDISPLAY [ n |ALL |OFF ];
toggles off/on whether to display the number of rows retrieved by
SQL> SET COUNT [ON | OFF] ;
toggles off/on whether commands are displayed before being executed. The default is ON but you might want to toggle it to OFF if sending your output to a script file.SQL> SET ECHO [ON | OFF] ; /* default is ON */
Example script wizzo.sql:...
specifies the character set that is to be active in database transactions. This is very important if your database’s default character set is not NONE. If the client and database character sets are mismatched, you risk transliteration errors and storing wrong data if you use isql for performing updates or inserts or for searches (including searched updates and deletes).
SET NAMES is available in scripts.SQL> SET NAMES charset ;
Example in script:...
specifies whether to display the optimizer’s query plan.SQL> SET PLAN [ON|OFF ];
As a shortcut, you can omit ON|OFF and just use SET PLAN as a toggle. Example in a script:...
SET PLANONLY specifies to prepare SELECT queries and display just the plan, without executing the actual query.SQL> SET PLANONLY ON | OFF;
The command works as a toggle switch. The argument is optional.
SET SQL DIALECT sets the Firebird SQL dialect to which the client session is to be changed. If the session is currently attached to a database of a different dialect from the one specified in the command, a warning is displayed and you are asked whether you want to commit existing work (if any).SQL> SET SQL DIALECT n ;
Example:SQL> SET SQL DIALECT 3 ;
specifies whether to display performance statistics following the output of a query.SQL> SET STATS [ON |OFF];
You can omit ON|OFF and use just SET STATS as a toggle. Figure shows a typical statistics summary being displayed after the output of a query.
SET STATS example
SET TERM specifies the character that will be used as the command or statement terminator, from the next statement forward. It is available in scripts. See the notes about this command earlier in this chapter.SQL> SET TERM string ;
SET TIME specifies whether to display the time portion of a DATE value (dialect 1 only).SQL> SET TIME [ON|OFF ];
Example:SQL> SELECT HIRE_DATE FROM EMPLOYEE WHERE EMP_NO = 145;
specifies whether warnings are to be output. SET WNG, used as a simple toggle, can be substituted.SQL> SET WARNINGS [ON |OFF ];
Exiting an Interactive isql Session
To exit the isql utility and roll back all uncommitted work, enterSQL> QUIT;
To exit the isql utility and commit all work, enterSQL> EXIT;
Firebird Related Interview Questions
|RDBMS Interview Questions||MySQL Interview Questions|
|Linux Interview Questions||Mac OS X Deployment Interview Questions|
|Windows Administration Interview Questions||Windows Server 2003 Interview Questions|
|SQL Interview Questions||NoSQL Interview Questions|
|Advanced C++ Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.