练习
Create table if no exits student(
`id` int(4) not null ,
`name` char(10) not null,
`sex` int(4) not null,
`phone` char(20) not null,
`role ` int(4) not null,
`score` int(4) not null,
primary key(`id`)
)ENGINE=INNODB DEFAULT CHARSET=utf8;
Insert into student values(
‘1’,’zhangsan’,’2’,’13837689458’,’1’,’54’),
(‘2’,’lisi’,’2’,’18537689458’,’2’,’90’),
(‘3’,’wangwu’,’1’,’15937689458’,’3’,’94’),
(‘4’,’zhaoliu’,’2’,’13037689458’,’3’,’82’)
Update student set phone=’11645123132’ where name=’lisi’;
Select * from student where score<60;
Select * from student where name like ‘z%’;
Select * from student where role=1 or role=3;
Delete from student where role=1;
truncate table student;
浙公网安备 33010602011771号