+1 vote
in SQLite by
What is UNION operator? How does it work?

1 Answer

0 votes
by

SQLite UNION Operator is used to combine the result set of two or more tables using SELECT statement. Both the tables must have same number of fields in result table.

Syntax:

SELECT expression1, expression2, ... expression_n    

FROM tables    

[WHERE conditions]    

UNION    

SELECT expression1, expression2, ... expression_n    

FROM tables    

[WHERE conditions];   

...