SQL syntax error at or near 'union'
问题 I have a small query, and a union to put another small query next to it. However, the union has a syntax error in it. Select <column1> ,<column2> From <Table1> <Some joins in there> Where <conditions> group by <column2> order by <column2> union select <column2> ,<column3> ,<column4> From <Table2> <Some more joins here> Where <conditions> group by <column2> order by <column2> This is the Error I receive ERROR: Syntax error at or near 'union' 回答1: I see what was wrong. You have to place the