您的位置:首页 > 数据库

数据库的增删改查crud(sql语句)

2017-04-09 20:58 218 查看
创建表(以下contactinfo为表名,字段:username phone )

create table contactinfo(id integer primary key autoincrement,username text,phone text);


增加一条数据(‘zhangsan’,’150188888888’)

insert into contactinfo (username,phone)values('zhangsan','150188888888');


修改数据

update contactinfo set phone='150111111111' where username='zhangsan';


查询

select phone from contactinfo where username='zhangsan';


删除

delete from contactinfo where username='zhangsan';
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  数据库 sql
相关文章推荐