Distinct將重複的資料列變為一列。
1
2
3
4
5
6
--取得4月份有賣出商品的商品ID列表
--但ID不能重複
select distinct 商品ID
from [販賣資料]
where [處理日] between '2006-04-01' and '2006-04-30'
Distinct將重複的資料列變為一列。
1
2
3
4
5
6
--取得4月份有賣出商品的商品ID列表
--但ID不能重複
select distinct 商品ID
from [販賣資料]
where [處理日] between '2006-04-01' and '2006-04-30'
A new version of content is available.