79120485

Date: 2024-10-24 05:44:18
Score: 1.5
Natty:
Report link

You need to make sure that your column sort order is the same in all of the unions. if each query works fine and it doesn't after applying the union, then probably your sort order for columns is different. for example:

select col1, col2, col3 from table1 union select col1, col2, col3 from table2

I hope this can fix your problem.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Iman Sheikhi