1:加载驱动
2:连接数据库
3:操作数据库
创建表:
create table person(
_id integer primary key,
name varchar(20),
age integer
);
添加: insert into person(name, age) values('lisi', 19);
删除: delete from person where _id = 1;
修改: update person set name = '李四' where name = '王五';
查询所有: select * from person;
查询单条: select * from person where name = 'zhangsan';
|
|