帮助信息
help command;
查看历史记录
h;
Each entry in the history list is identified by a unique number. The ! character followed by the number of the command can be used to execute the command again. For example:
!1;
Saving and clearing the ttIsql command history
Command> savehistory history.txt;
If the output file already exists, use the -a option to append the new command history to the file or the -f option to overwrite the file. The next example shows how to append new command history to an existing file.
Command> savehistory -a history.txt;
You can clear the list of commands that ttIsql stores by using the clearhistory command:
Command> clearhistory;
显示数据库结构信息
-
describe- Displays information on database objects. -
dssize- Reports the current sizes of the permanent and temporary database partitions. -
monitor- Displays a summary of the current state of the database.
使用 prepared statement
Command> timing 1; Command> create table t1 (key number not null primary key, value char(20)); Execution time (SQLExecute) = 0.007247 seconds. Command> prepare insert into t1 values (:f, :g); Execution time (SQLPrepare) = 0.000603 seconds. Command> exec; Type '?' for help on entering parameter values. Type '*' to end prompting and abort the command. Type '-' to leave the parameter unbound. Type '/' to leave the remaining parameters unbound and execute the command. Enter Parameter 1 'F' (NUMBER) > 1; Enter Parameter 2 'G' (CHAR) > 'abc'; 1 row inserted. Execution time (SQLExecute) = 0.000454 seconds. Command> exec; Type '?' for help on entering parameter values. Type '*' to end prompting and abort the command. Type '-' to leave the parameter unbound. Type '/' to leave the remaining parameters unbound and execute the help command. Enter Parameter 1 'F' (NUMBER) > 2; Enter Parameter 2 'G' (CHAR) > 'def'; 1 row inserted. Execution time (SQLExecute) = 0.000300 seconds. Command> free; Command> select * from t1; < 1, abc > < 2, def > 2 rows found. Execution time (SQLExecute + Fetch Loop) = 0.000226 seconds. Command> disconnect; Disconnecting... Execution time (SQLDisconnect) = 2.911396 seconds. Command>
ttIsql命令与数据库操作
本文介绍ttIsql命令的使用方法,包括帮助信息、历史记录管理、数据库结构信息展示及预编译语句的使用。通过实例演示了如何创建表、插入数据并查询,展示了SQL命令执行的时间。
573

被折叠的 条评论
为什么被折叠?



