Sqlite建立數據庫,表

Microsoft Windows [版本 6.1.7601]
版權全部 (c) 2009 Microsoft Corporation。保留全部權利。

C:\Users\han>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-3120000\mydb.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,沒有則建立。sql

相關文章
相關標籤/搜索