sqlite3命令行下的常用命令
1、进入到sqlite互动模式倦虺赳式。输入sqlite3,或者sqilite3+*.db,其中*是数据库的名字,如果没有这个名字的数据库就创建一个新的数据库。
2、.exit ,退出sqlite互动模式的命令
3、.help,列出命令的提示信息。
4、create table <table_name> (f1 type1, f2 type2,…);创建新表
5、.tables显示数据库中所有表名
6、drop table <table_name>删除表
7、.schema <table_name>查看表的结构
8、.database显示当前打开的数据库文件
9、insert into <table_name> values (value1, value2,…);向表中添加新记录
10、select * from <table_name>;查询表中所有记录
11、update <table_name> set <f1=value1>, <f2=即枢潋雳value2>… where <expression>;更新表中记录
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:89
阅读量:41
阅读量:46
阅读量:65
阅读量:23