第七章 高级数据库查询
select [distinct top 3 [percent] with ties] col_name
into ntb_name
form tb_name
where
group by
having
order by
compute
函数:选择函数:case when then…else end
日期函数:
排名函数:rank:1 2 2 4 4 4 7
dense_rank:1 2 2 3 3 3 4
row_number:
ntile:
运算:union intersect except
子查询:where col_name not in (select col_name…)
where col_name not exists (select *…)
any all
开窗函数:over (partition by col_name)
共用表表达式 with…as
自连接与外连接
SELECT DISTINCT TOP 3 WITH TIES col_name
INTO new_tb_name FROM tb_name
WHERE…
GROUP BY… HAVING…
ORDER BY
COMPUTE
评论区
欢迎你留下宝贵的意见,昵称输入QQ号会显示QQ头像哦~