时间:2024-02-14 10:20作者:下载吧人气:29
利用over(),将统计信息计算出来,然后直接筛选结果集
declare @t table(
ProductID int,
ProductName varchar(20),
ProductType varchar(20),
Price int)
insert @t
select 1,’name1′,’P1′,3 union all
select 2,’name2′,’P1′,5 union all
select 3,’name3′,’P2′,4 union all
select 4,’name4′,’P2′,4
网友评论