You need to combine the results of two queries into a single result that contains all of the rows from both queries. Which Structured Query Language (SQL) statement should you use?
A. TRUNCATE
B. JOIN
C. EXCEPT
D. UNION
2 Comments on “Which Structured Query Language (SQL) statement should you use?”
Jainsays:
D
1
0
avalon333says:
[The UNION clause allows you to combine the results of two or more queries into a resulting
single set that includes all the rows belonging to the query in that union. The UNION clause is
entirely different from the JOIN statements, which combine columns from two different tables.
You must remember a couple of basic rules when combining the results of two queries via the UNION clause:
•The number and order of the columns must be the same in each of the queries in the clause.
•The data types you use must be compatible. ]
D
1
0
[The UNION clause allows you to combine the results of two or more queries into a resulting
single set that includes all the rows belonging to the query in that union. The UNION clause is
entirely different from the JOIN statements, which combine columns from two different tables.
You must remember a couple of basic rules when combining the results of two queries via the UNION clause:
•The number and order of the columns must be the same in each of the queries in the clause.
•The data types you use must be compatible. ]
3
0