-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.txt
53 lines (53 loc) · 1.89 KB
/
commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
show databases;
CREATE DATABASE tmp;
SHOW DATABASES;
create database del;
SHOW DATABASES;
DROP DATABASE del;
SHOW DATABASES;
use demo;
show tables;
create table tmp(id INT, testname CHAR(25), sex INT);
show tables;
drop table tmp;
show tables;
select * from course;
insert into course(cname, cid) values('TETSCOURSE', 13);
select * from course;
select * from student;
insert into student values('TEST',20,2);
insert into student values('TEST2',999,2);
insert into student values('TEST3',999,2);
insert into student values('TEST4',999,2);
insert into student values('TEST5',999,2);
insert into student values('TEST6',999,2);
select * from student;
insert into student(sname,sage) values('TEST7',555);
insert into student(sname,sage) values('TEST8',666);
select * from student;
select sname from student;
select ssex from student;
select sname,sage from student;
select sname,sage from student where sage > 20;
select sname,sage from student where sage < 20;
select sname,sage from student where sage = 20;
select sname,sage from student where sage <> 20;
select sname,sage from student where sage != 20;
select sname,sage from student where (((sage = 20)));
select sname,sage from student where sage > 18 and sage < 35;
select sname,sage from student where (sage > 18) and (sage < 35);
select sname,sage from student where sage < 18 or sage > 35;
select sname,sage from student where (sage < 18) or (sage > 35);
select sname,sage from student where sname = 'chen' and sage = 20;
select * from student;
delete from student where sage > 100;
select * from student;
delete from student where sname = 'TEST' and sage = 20 and ssex = 2;
select * from student;
select * from student where sname = 'chen';
update student set sage = 21 where sname = 'chen';
select * from student where sname = 'chen';
select * from student where sname = 'clay';
update student set sage = 999 where sname = 'clay';
select * from student where sname = 'clay';
exit