You can perform a UNION operation on two SELECT queries, one of them having a constant.
- Table1 has 6 columns: Col1, Col2, Col3, Col4, Col5, Col6
- Table2 has 5 columns: Col1, Col2, Col3, Col4, Col6
- Its possible to write a query such as:
Code:
SELECT Col1, Col2, Col3, Col4, Col5, Col6
FROM Table1
UNION
SELECT Col1, Col2, Col3, Col4, 0, Col6
FROM Table2