Re: [問題] MySQL關聯語法問題?

看板Web_Design作者 ( 苦海釣叟)時間19年前 (2006/04/12 09:15), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/3 (看更多)
※ 引述《forkome (烏龜)》之銘言: : 部門 : ========================== : table名稱 dept : 欄位名稱 deptId : deptName : 職稱 : ========================== : table名稱 position : 欄位名稱 positionId : positionName : 使用者 : ========================== : table名稱 user : 欄位名稱 userId : userName : userDept <===關聯部門 : userPosition <===關聯職稱 : 小弟現在只會關聯一個 select * from user join dept on userDept = deptId : 若想要user和dept、position在一次查詢中關聯起來,該如何下指令呢? : 先謝了 select * from user, dept, position on (userDept = deptID and userPosition = positionName); (可能這樣可以過) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.50.171

04/12 23:59, , 1F
感謝!小弟已看到
04/12 23:59, 1F
文章代碼(AID): #14F5JEQn (Web_Design)
討論串 (同標題文章)
文章代碼(AID): #14F5JEQn (Web_Design)