I want my query to return only the first record of the first table (if there is data in it), because the second table does not have repeated data.
But it returns me this error:
Error Code: 1221. Incorrect usage of UNION and LIMIT
My code:
SELECT administradores_id FROM adm LIMIT 1
UNION
SELECT usuarios_id FROM user;