亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

MySQL:無效使用組函數

MySQL:無效使用組函數

米琪卡哇伊 2019-10-10 16:56:41
我正在使用MySQL。這是我的架構:供應商(sid:整數,sname:字符串,地址字符串)零件(pid:整數,pname:字符串,color:字符串)目錄(sid:整數,pid:整數,成本:實數)(主鍵以粗體顯示)我正在嘗試編寫查詢以選擇至少兩個供應商制造的所有零件:-- Find the pids of parts supplied by at least two different suppliers.SELECT c1.pid                      -- select the pidFROM Catalog AS c1                 -- from the Catalog tableWHERE c1.pid IN (                  -- where that pid is in the set:    SELECT c2.pid                  -- of pids    FROM Catalog AS c2             -- from catalog    WHERE c2.pid = c1.pid AND COUNT(c2.sid) >= 2 -- where there are at least two corresponding sids);首先,我什至會以正確的方式這樣做嗎?其次,我得到這個錯誤:1111-無效使用組功能我究竟做錯了什么?
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 918 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號