我需要兩個查詢的UNION
,他們每個人分別工作,但不在一起,我得到錯誤:重複列名zipcode_id
,請大家幫忙。SQL UNION的兩個查詢,重複的列名錯誤
(SELECT * FROM
((SELECT * FROM jobs AS j LEFT JOIN zipcode AS z ON z.zipcode_id=j.zipcode_id WHERE 1 AND source='student'
ORDER BY postdate DESC LIMIT 20) ORDER BY search_order DESC)
s1)
UNION ALL
(SELECT * FROM
( (SELECT * FROM jobs AS j LEFT JOIN zipcode AS z ON z.zipcode_id=j.zipcode_id WHERE 1 AND source='manager'
ORDER BY postdate DESC LIMIT 30, 1000000) ORDER BY postdate DESC)
s2)
非常感謝,它的作品! – ickx