当前位置:网站首页>Mysql database - single table query (I)

Mysql database - single table query (I)

2022-04-23 19:42:00 X heart

The first 1 Turn off : Basic query statement

USE Company;

# Please add the implementation code here 
########## Begin ##########

########## retrieving the Name and Salary ##########
select Name,Salary
From tb_emp;

########## retrieving all the table ##########
select *
From tb_emp;

########## End ##########

The first 2 Turn off : belt IN Keyword query

USE Company;

# Please add the implementation code here 
########## Begin ##########

########## retrieving the Name and Salary with IN statement ##########
select Name,Salary
from tb_emp
where id not in (1);



########## End ##########

The first 3 Turn off : belt BETWEEN AND The scope of inquiry

USE Company;

# Please add the implementation code here 
########## Begin ##########

########## retrieving the Name and Salary with BETWEEN AND statement ##########

select Name,Salary from tb_emp where Salary > 3000 and Salary < 5000;

########## End ##########

版权声明
本文为[X heart]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231927030936.html