sql查询将数字单位转换为中文单位
以 Emp,Dept 表为实例:表结构就不给大家展示了select * from empselect * from dept将 emp 表的sal字段进行相对应的sql处理select empno,case when sal>=1000 then concat(round(sal/1000,2),'千') when sal>=100 then concat(round(sal/100,2),'百') end sal from emp最终得到结果如下:.
原创
2022-03-23 11:00:01 ·
1038 阅读 ·
0 评论