正确列子: -- 逻辑表达式 case when ...then... else ... end select *,case when sal>=3000 then '高' when sal<=1500 then '低' else '中' end as 工资级别 from emp; 错误原因:when语句的缩进要对齐
wo5656500
2020-03-05
在计算平均薪资的时候avg后要加round函数才能显示为什么? 聚合后小数位数很长,workbench中只显示4位小数,但是实际存储小数位数很长,需要四舍五入后就可以进行等值判断了
wo5656500
2020-03-05
select deptno,max(sal) #查询部门里面的最大工资 from emp group by deptno; select empno,ename,sal,emp.deptno from emp left join (select deptno,max(sal)as 最高工资 from emp group by deptno)as t on emp.deptno=t.de
wo5656500
2020-03-05
错误代码: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'issplit = '1' where term = '00'' at line 1 原来的sql语句
wo5656500
2020-03-05
文件路径错误 解决方法:一般这种错误就是就是要导入的文件放错位置,应该把文件放在MySQL文件夹下programe data那个文件夹下的指定路径
wo5656500
2020-03-05