小马亮哥的博客构建临时表(第一步也是最重要的一步!)PARTITION 函数是关键 select * into #Table from (select distinct NeedType,Source, count(0) over(PARTITION by Source,NeedType)as Sourcecount from [table1] where ...
域清风的博客1.单表查询 1.基础查询 1.查询所有列 SELECT * FROM stu; 2.查询指定列 SELECT sid, sname, age FROM stu; 3.条件查询 SELECT sid, sname, age FROM stu where sid = 3; 2.条件查询介绍 1.运算符及关键字 WHERE子句...