创建数据库:
1:sqlite3 abc.db
2: .open abc.db
查看数据库:
.databases
附加数据库:(将数据库abc附加)
attach database ‘abc.db’ as ‘test’;
分离数据库:
detach database ‘TEST’;
创建表students:
create table students(id int primaryr key not null,
age int not null,
name text not null);
查询表:
.tables
Update-修改表student中的已有记录:
update student set name=‘Yang’ where id=6;
查询表students的完整信息:
.schema students
drop-删除表student:SQLite 的 DROP TABLE 语句用来删除表定义及其所有相关数据、索引、触发器、约束和该表的权限规范。
drop table student;
Insert into-在表students中插入数据:
insert into students values(1,18,’zhang’);
或者:insert into students(id,age,name)va