本文主要是介绍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
退出
isql [-b] [-e] [-F] [-p] [-n] [-v] [-X] [-Y]
[-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] [-z localename]
[-Z security_mechanism]
这篇关于Sybase isql 命令行入门的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!