Sybase isql 命令行入门
$ isql -U username -P password
1> sp_helpdb
2> go
列出所有库
1> use afcdb
2> go
打开一个库
1> sp_help
2> go
列出库中所有的表
1> sp_help DB01
2> go
查看一个表的定义
1> select count(*) from DB01
2> go
执行一句SQL语句
1> create table tmpTable (
2> id int,
3> name char(128))
4> go
建了一个叫tmpTable的表
1> insert into tmpTable values(1, ‘Robert is a pig!’)
2> go
(1 row affected)
插入一条数据
1> select * from tmpTable
2> go
id
name
———–
——————————————————————————————————————————–
1
Robert is a pig!
(1 row affected)
查询
1> quit
退出
sybase@HNZZ-IMS-ENUM-DB01:~> isql -?
Syntax Error in '-?'.
usage: isql [-b] [-e] [-F] [-p] [-n] [-v] [-W] [-X] [-Y] [-Q]
[-a display_charset] [-A packet_size] [-c cmdend] [-D database]
[-E editor] [-h header] [-H hostname] [-i inputfile]
[-I interfaces_file] [-J client_charset] [-K keytab_file]
[-l login_timeout] [-m errorlevel] [-M labelname labelvalue]
[-o outputfile] [-P password] [-R remote_server_principal]
[-s col_separator] [-S server_name] [-t timeout] [-U username]
[-V [security_options]] [-w column_width] [-y sybase directory]
[-z localename] [-Z security_mechanism] [-x trusted.txt_file]
[--retserverror] [--conceal [wildcard]] [--help]
sybase@HNZZ-IMS-ENUM-DB01:~> timed out waiting for input: auto-logout