E1, Database
Creating a database: Create databases Student_teacher;
Delete databases: drop database student_teacher;
2. Table
Creating tables: Create table student;
Delete tables: drop table student;
Add a column: Alter table student add column name char;
3. View
Creating views: Create View Stu;
Delete view: Drop view Stu;
4. Simple table Data Operation statement
Select: SELECT * from student where no=091120109;
Inserting tuples: INSERT into student (No,num,sex,grade) values (1,091120109,male,98);
Delete tuple: Delete form student where Sex=male;
Update the value of the field property: Update student set Sex=female where Sex=male;
Fuzzy Lookup: SELECT * FROM student where num like "%911201%"; The% represents any 0 or more characters, and ' _ ' represents any single character.
Sort (desc is descending, ASC is ascending): Select *from student ORDER by Num [DESC];
Getting Started with SQL statements