[英]MySQL get count of all rows in another table where the value equals column in current table
[英]MySQL statement to get a column's value from all rows where another column's value = a specified value
有人可以告訴我一條MySQL語句,該語句將在列教師的值等於charles的所有行中獲得列Student的值嗎?
如果此信息在同一表中,則
select student from table_name where teacher = 'charles'
如果您有3張應有的表格(教師,學生和教師教師的M:N表),請發表評論,因為您需要加入。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.