首页 > 数据库技术 > 详细

数据库

时间:2015-09-16 21:37:57      阅读:313      评论:0      收藏:0      [点我收藏+]

SQL语句

创建表

create table if not exists Teacher (tea_id integer primary key autoincrement, tea_name text, tea_gender text, tea_age integer, tea_salary text)

插入数据

insert into Teacher (tea_id, tea_name, tea_gender, tea_age, tea_salary) values (38, ‘豪豪‘, ‘男‘, 38, ‘250’)

insert into Teacher (tea_name, tea_gender, tea_age, tea_salary) values (‘大神‘, ‘男‘, 38, ‘250’)

查询所有数据

select * from teacher

查询 姓名, 性别

select tea_name, tea_gender from teacher

条件查找

select * from teacher where tea_name = ‘豪豪’

更新数据

update Teacher set tea_gender = ‘女‘ where tea_name = ‘豪豪’

删除

drop table teacher

delete from teacher where tea_id = 38;

 

数据库

原文:http://www.cnblogs.com/tapple/p/4814380.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!