Exercise --MySQL

operation:

  1. View job is teacher of the employee's name, age

  2. View job is older than 30-year-old teacher and employee name, age

  3. View job is teacher salaries and employee names in the 9000-10000 range, age, salary

  4. View job description is not NULL employee information

  5. View job is teacher salaries and employee name is 9000 or 10,000 or 30,000, age, salary

  6. View job is teacher salaries and employee name is not 9000 or 10000 or 30000, age, salary

  7. View job is teacher and employee name jin name is the beginning of the annual salary

 

 

1.  select name,age from t1 where job =teacher;

2.  select name ,age from t1 where job=teacher and age >30;

3.  select name, age, salary from t1 where job =teacher and salary between 9000 and 10000;

4.  select * from t1 where job_comment is not null;

5.  select name, name, salary from t1 where job =teacher and salary in(10000,9000,30000);

6.  select name, name, salary from t1 where job =teacher and salary not in(10000,9000,30000);

7.  select name ,salary from t1 where  job =teacher and name like'jin%';

Guess you like

Origin www.cnblogs.com/binyuanxiang/p/11769039.html