It is also used for record for future contact! It basically contains the advanced usage of General SQL!
Drop table if exists stu; create table stu (name varchar (30), age int, stuid int not null PRIMARY key AUTO_INCREMENT, idnum int, sex varchar (30 ), check (sex in ('male', 'female ') charset = utf8; insert into stu (name, age, idnum, sex) VALUES ('dbin', 789,4678945, 'male'); insert into stu (name, age, idnum, sex) VALUES ('coco ', 13,345, 'female'); insert into stu (name, age, idnum, sex) values ('Kitty ', 14,123, 'female'); insert into stu (name, age, idnum, sex) values ('Alice ', 'female '); SELECT * from stu; select * from stu limit 0, 2; select * from stu where name like '% ce '; select * from stu where name REGEXP "a [sfdl] [^ ads]"; select * from stu where name in ('damon ', 'Alice '); select * from stu where name BETWEEN 'coco 'and 'Kitty'; select * from stu where name not between 'coco 'and 'Kitty'; select name as stuname, stuid as id from stu; drop view if EXISTS young_stu; create view young_stu asselect name, age from stu where age between 10 and 20; select * from young_stu where age is not null;
Next we will record a chapter dedicated to using SQL functions.