上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 65 下一页
摘要: select sal as '原始数据', round(sal) as '四舍五入后的数据' ,round(sal,1) as '四舍五入1个小数点后的数据'from emp; 阅读全文
posted @ 2023-10-17 19:44 胖豆芽 阅读(10) 评论(0) 推荐(0) 编辑
摘要: # 查询时 去掉前后的空格 select * from emp where ENAME=trim(' SMITH') 阅读全文
posted @ 2023-10-17 19:27 胖豆芽 阅读(1) 评论(0) 推荐(0) 编辑
摘要: # 截取名字的第一个字母 注意开始下标是1 长度是1 格式(列名,开始下标,截取的长度) select substr(ENAME,1,1) from emp; # 获取员工姓名第一个字母是A的人员的信息 select * from emp where substr(ENAME,1,1)='A'; # 阅读全文
posted @ 2023-10-17 18:57 胖豆芽 阅读(4) 评论(0) 推荐(0) 编辑
摘要: # 将查询到名字强转为小写select lower(ENAME) from EMP; 阅读全文
posted @ 2023-10-17 18:46 胖豆芽 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-10-17 18:17 胖豆芽 阅读(17) 评论(0) 推荐(0) 编辑
摘要: # 先用工资排序 ,如果工资相等,再用名字排序select * from emp order by sal desc,ENAME desc; 阅读全文
posted @ 2023-10-17 17:59 胖豆芽 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-10-17 17:53 胖豆芽 阅读(19) 评论(0) 推荐(0) 编辑
摘要: # 模糊匹配 %包含的值%select * from emp where ENAME like '%S%'; # 找出名称以S开头的人的信息select * from emp where ENAME like 'S%'; # 找出名字以第二个字母是O的人的信息select * from emp wh 阅读全文
posted @ 2023-10-17 17:31 胖豆芽 阅读(44) 评论(0) 推荐(0) 编辑
摘要: # 查询是800或5000的工资的人select * from emp where SAL in(800,5000); # 查询薪资在800到1000之间的人select * from emp where SAL between 800 and 5000; 阅读全文
posted @ 2023-10-17 17:03 胖豆芽 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-10-17 16:49 胖豆芽 阅读(1) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 65 下一页