課程
/數據庫
/SQL Server
/SQL Server基礎--T-SQL語句
比如查某個部門購買的哪些商品是所有部門都沒有買過的,這個需要嵌套select嗎?
2018-07-22
源自:SQL Server基礎--T-SQL語句 2-6
正在回答
select distinct(item)? from? table? where? item? not? in? (select? distinct(item)? from? table? where? bumen<>'mouge')? ?and? bumen='mouge'? ? ? ? ? ?-----------------不知道對不對......等待實踐檢驗
select?*?from? something?where?name?in?(select?name?from??something?group?by?name?having?COUNT(*)>1)
select
*?
from
?
where
name
in
(
something?
group
by
having
COUNT
(*)>1)
冰楓565
舉報
SQL Server基礎教程,主要講解TSQL的基本查詢語句和基本用法
1 回答查詢的時候 排序 問題是先查后排 還是先排后查
1 回答老師,我想問一下這個ER圖是怎么實現的
1 回答額。。只有查詢么
1 回答查詢用下劃線(_)和百分號(%)的問題
1 回答查詢語句的問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-09-02
select distinct(item)? from? table? where? item? not? in? (select? distinct(item)? from? table? where? bumen<>'mouge')? ?and? bumen='mouge'? ? ? ? ? ?-----------------不知道對不對......等待實踐檢驗
2018-07-24
select
?*?
from
? something?
where
?name
?in
?(
select
?name
?from
??something?
group
?by
?name
?having
?COUNT
(*)>1)