当前位置: 移动技术网 > IT编程>数据库>MSSQL > sql数据库增删查改练习题及数据库建表语句

sql数据库增删查改练习题及数据库建表语句

2018年12月09日  | 移动技术网IT编程  | 我要评论

动员大会发言稿,智者成衣,淮安工长

建表语句:

create table `tb_user_t2` (
  `id` int(11) not null auto_increment comment '编号',
  `name` varchar(20) default null comment '姓名',
  `sex` varchar(4) default null comment '性别',
  `birth` year(4) default null comment '出生年份',
  `department` varchar(20) default null comment '院系',
  `phone` varchar(18) default null comment '手机号码',
  `address` varchar(255) default null comment '家庭住址',
  primary key (`id`)
) engine=innodb auto_increment=37 default charset=utf8;

1.查询所有信息:select * from tb_user_t2;

2.查询所有出生年份是2000的信息:select * from tb_user_t2 where birth = 2000;

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网