题176. 第二高的薪水:max( )函数
思路:先查找最高收入的薪水,在小于最高收入里面查找最高收入,即第二高收入。
select max(salary) as secondhighestsalary from employee where salary < (select max(salary) from employee);
题627. 交换工资:if( )函数
思路:if( ) 方法
update salary set sex=if(sex='m','f','m');
如对本文有疑问, 点击进行留言回复!!
服务器Centos部署MySql并连接Navicat过程详解
网友评论