碎点篇—— oracle 语法和练习
返回主目录 --select from where having group by order by 的正确执行顺序为: --from-->where-->group by-->having-->select-->order by -------------------------------------------------------- --1、去重:distinct 必须放在开头,多字段,每个字段不一样才去重 --2、条件比较: -- =,!=,<>,<,>,<=,>=,any,some,all -- is null, is not null -- between x and y -- in(list) , not in (list) -- like _,%,escape '\' _\%escape '\' -- not, (and,or) and优先级高 -- 按照单个列排序 -- order by col -- 降序排列:order by col desc -- 升序排列:order by col asc -- 按多个列排序:(优先级) -- order by col1 desc(asc) , col2 desc(asc) --1.全集:union all --2.并集:union (去重) --3.交集:intersect --4.差集:minus --5.不懂怎么用