加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Sqlite创建数据库,表

发布时间:2020-12-12 23:44:26 所属栏目:百科 来源:网络整理
导读:Microsoft Windows [版本 6.1.7601]版权所有 (c) 2009 Microsoft Corporation。保留所有权利。C:Usershanf:F:cd F:sqlite-tools-win32-x86-3120000F:sqlite-tools-win32-x86-3120000sqlite3.exe mydb.dbSQLite version 3.12.0 2016-03-29 10:14:15Enter
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:Usershan>f:

F:&;cd F:sqlite-tools-win32-x86-3120000

F:sqlite-tools-win32-x86-3120000>sqlite3.exe mydb.db
SQLite version 3.12.0 2016-03-29 10:14:15
Enter ".help" for usage hints.
sqlite> .databases
seq  name             file

---  ---------------  ----------------------------------------------------

0    main             F:sqlite-tools-win32-x86-3120000mydb.db

sqlite> create table test(id integer default 0,username text);
sqlite> .tables
test
sqlite> insert into test(id,username)value(1,"test");
Error: near "value": syntax error
sqlite> insert into test(id,username)values(1,"test");
sqlite> select * from test
   ...> ;
1|test
sqlite> .tables
test
sqlite> select * from test
   ...> ;
1|test
sqlite>





启动的时候 就要在 cmd 界面指明 db,没有则创建。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读