我的问题如下:ORDER BY子句不能与UNION工作的所有
SELECT title, 'dossier' as Source FROM dossier
UNION ALL
SELECT title, 'contract' as Source FROM contract ORDER BY `time` LIMIT 5
time
列存在两个表中,但MySQL的引发以下错误:
unknown column 'time' in 'order clause'
当我删除, 'dossier' as Source
和, 'contract' as Source
查询工作正常。
请给作为两个表格的模式 – apomene