Operation Database job day34

  1. View job is teacher of the employee's name, age
select name,age from employee where post='teacher'; 
  1. View job is older than 30-year-old teacher and employee name, age
select name,age from employee where post='teacher' and age>30; 
  1. View job is teacher and staff salaries in the 9000-1000 range name, age, salary
select name,age,salary from employee where post='teacher' and salary between 1000 and 9000;     
  1. View job description is not NULL employee information
select * from employee where post is not null; 
  1. View job is teacher salaries and employee name is 9000 or 10,000 or 30,000, age, salary
select name,age,salary from employee where post='teacher' and salary=10000 or salary=9000 or salary=30000; 
  1. View job is teacher salaries and employee name is not 9000 or 10000 or 30000, age, salary
select name,age,salary from employee where post='teacher' and salary!=10000 and salary!=9000 and salary!=30000; 
  1. View job is teacher and employee name jin name is the beginning of the annual salary
select name,salary*12 from employee where post='teacher' and name li'jin%';

Guess you like

Origin www.cnblogs.com/shin09/p/11761776.html