Also used for recording for future contact! It basically contains the advanced usage of general SQL!
drop table if exists stu;create table stu (name varchar (), age int,stuid int not null PRIMARY key Auto_increment,idnum int , sex varchar (+), check (Sex in (' Male ', ' female ')) Charset=utf8;insert into Stu (name,age,idnum,sex) VALUES (' Damon ', 789,4678945 , ' Male '), insert into Stu (Name,age,idnum,sex) VALUES (' Coco ', 13,345, ' female '), insert into Stu (Name,age,idnum,sex) VALUES (' Kitty ', 13, 46, ' female '), insert into Stu (Name,age,idnum,sex) VALUES (' Alice ', 14,123, ' 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 isn't between ' Coco ' and ' Kitty '; select name as stuname,stuid as ID from Stu;drop view if Exis TS young_stu;create View Young_stu asselect name,age from Stu where age between ten and 20;select * from Young_stu where AG E is not null;
A chapter is later recorded that specifically uses SQL functions.