How do i do select p.Quota without writing the long full name? right now i am doing
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 ;
I get the error:
ERROR 1054 (42S22): Unknown column 'c.StatusId' in 'on clause'
However the column does exit and this code works:
SELECT c.id,
c.UserName,
cs.StatusName
FROM CUSTOMERS AS c
JOIN CUSTOMERSTATUSTYPES as cs ON c.StatusId = cs.CustomerStatusId
LIMIT 1 ;