摘要:
1、窗口函数 2、case when 多条件判断的语句,根据不同条件来返回相应的值 注意:case函数只返回第一个符合条件的值,剩下的case部分将会被自动忽略 3、变量 4、with as ① 单表 ② 多表 注意:with as 语句之后不能加分号结束,不然会报错,必须用select结束。 5、 阅读全文
摘要:
1、子查询(嵌套在其他查询中的查询) 注意:嵌套的语句经常使用在where 或者 from 中的字句,多值时用in和not in (1)where子查询:select col1 from table1 where col2 = (select col3 from table2) (2)from子查询 阅读全文