I have two tables with similar columns – let’s say table A with column LABEL_A
and table B with column LABEL_B. The data types of LABEL_A and LABEL_B are same.
How can I select LABELs from both tables in a single query? (So the the result of the query contains single column LABEL containing data from LABEL columns of both tables).
EDIT: Can I use such UNION queries in a CURSOR?
Thanks for answers.
Use:
UNION ALLwill be faster, but won’t remove duplicates if they exist. UseUNIONif you want duplicates removed.