Which two true about a sql statement using SET operations such as UNION?
A.
The data type of each column returned by the second query must be implicitly convertible to the data type of the corresponding column returned by the first query
B.
The data type of each column retuned by the second query must exactly match the data type of the corresponding column returned by the first query
C.
The number, but not names, of columns must be identical for all SELECT statements in the query
D.
The data type group of each column returned by the second query must match the data type group of the corresponding column returned by the first query
E.
The names and number of columns must be identical for all SELECT statements in the query.
In the context of SQL statements using SET operations like UNION in Oracle Database 12c:
A. The data type of each column returned by the second query must be implicitly convertible to the data type of the corresponding column returned by the first query. This is correct. Oracle allows the union of columns as long as their data types are implicitly convertible, not necessarily identical.
C. The number, but not names, of columns must be identical for all SELECT statements in the query. This is correct. For a UNION operation to be valid, all SELECT statements involved must have the same number of columns, although their names and exact data types need not match.
Options B, D, and E are incorrect:
B is incorrect because exact data type matches are not required, only that they be implicitly convertible.
D is also incorrect for the same reason as B; it's enough that the types are compatible, not identical.
E is incorrect as the names
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit