更新时间:2023-01-20 12:40:02
默认情况下,如果您使用 *
,MySQL 将返回所有表的所有列.您需要在查询中明确输入列名,以按照您想要的方式检索它们.使用查询如下:
By default MySQL will return all columns for all tables if you use *
. You will need to explicitly enter column names in your query to retrieve them the way you want. Use the query as follows:
SELECT A.HEAD_name, A.Family_Size, A.Gender, A.ID_Number, A.DOB,
B.Supervisor_ID, B.Supervisor_Name, B.Supervisor_Number,
C.Center_ID, C.Location
FROM Family A
JOIN SUPERVISOR B on ( A.Supervisor_ID = B.Supervisor_ID)
JOIN CENTER C on (B.Center_ID = C.Center_ID);