摘要: student表:id ,name ,age -- nvl函数,如果age不为空则显示第一个参数即age原本的值,如果为空则显示第二个参数即18,且两个参数数据类型要一致,否则报错 select nvl(age,18) from student -- nvl2函数,如果name不为空则显示’亚索‘第 阅读全文
posted @ 2021-04-19 10:54 万里哥 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 数据库 : student表 id,s_name,s_age 三个字段 -- 通常在运算函数后可自定义新字段 -- 将查询数量转为自定义num select count(*) num from student -- 将查询年龄最大值自定义maxage select max(age) maxage f 阅读全文
posted @ 2021-04-19 10:24 万里哥 阅读(598) 评论(0) 推荐(0) 编辑