Select * from student where name like ‘h%’ or gender=‘女’ or grade=100;
Select* from dept where exists (selectdidfrom employee where age >21);
Select p1.* from employee p1 join employee P2 on p1.did=p2.did wherep2. Name=‘王红’
Select* from send where datediff(dd,sentime,getdate()) =0
MySQL>USE db_test;
Database changed MySQL > creat index index_subject->N content(subject(3)Asc);
Select * from db_test.content into outfile:’c:/backup/ backupcontent.txt’;
Create datebase student use student
Create table student_web(s_id int not hull, s_name varchar (12), s_fenshu int, s_hometow varchar (50), s_tuition int)
Insert into student _ web( s_id, s_name, s_fenshu, s_hometown, s_tuition)values(1,’ Jack Tomas’,89,’北京丰台’,2800)
Insert into student _ web( s_id, s_name, s_fenshu, s_hometown, s_tuition)values(2,’ Tom Joe ’,88,’洛阳涧西’,3000)
Insert into student _ web( s_id, s_name, s_fenshu, s_hometown, s_tuition)values(3,’ Smith s’,87,’郑州中原’,2700)
Select from student_ web where s _name like’%J%’
Select from student_ web where s_hometown =‘北京%’
Select from student_web where s_tuition<AVG(s_tuition)
net start mysqlmysql -u root -pnet stop mysqlmysql -remove