如何在不写长全名的情况下选择 p.Quota?现在我在做
SELECT c.id,
c.UserName,
p.Quota,
cs.StatusName
FROM CUSTOMERS AS c,
PRODUCTS AS p
LEFT JOIN CUSTOMERSTATUSTYPES as cs ON c.StatusId=cs.CustomerStatusId
LIMIT 1 ;
我得到错误:
ERROR 1054 (42S22): Unknown column 'c.StatusId' in 'on clause'
但是该列确实退出并且此代码有效:
SELECT c.id,
c.UserName,
cs.StatusName
FROM CUSTOMERS AS c
JOIN CUSTOMERSTATUSTYPES as cs ON c.StatusId = cs.CustomerStatusId
LIMIT 1 ;