,所以我得到的這個sql查詢的錯誤,但我不能看到我的錯誤我自己:SQL查詢:連接兩個表
SELECT group_members.group_id,
group_members.permissions,
group.group_name
FROM group_members,
group
WHERE group_members.group_id=group.group_id
AND group.group_id = 1
錯誤:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group WHERE group_members.group_id=group.group_id AND group.group_id = 1
感謝您的幫助!
我認爲這是考慮「組」作爲關鍵字。嘗試使用'JOIN'來加入表格。 – user2989408