ARA-C01 · Question #74
A table, EMP_ TBL has three records as shown: The following variables are set for the session: Which SELECT statements will retrieve all three records? (Select TWO).
The correct answer is B. SELECT * FROM EMP_TBL WHERE identifier(Scol_ref) IN ('Namel','Name2', 'Name3'); E. SELECT * FROM $tb1_ref WHERE $col_ref IN ($var1, Svar2, Svar3);. The correct answer is B and E because they use the correct syntax and values for the identifier function and the session variables. The identifier function allows you to use a variable or expression as an identifier (such as a table name or column name) in a SQL statement. It tak
Question
A table, EMP_ TBL has three records as shown:
The following variables are set for the session:
Which SELECT statements will retrieve all three records? (Select TWO).
Options
- ASelect * FROM Stbl_ref WHERE Scol_ref IN ('Name1','Nam2','Name3');
- BSELECT * FROM EMP_TBL WHERE identifier(Scol_ref) IN ('Namel','Name2', 'Name3');
- CSELECT * FROM identifier<Stbl_ref> WHERE NAME IN ($var1, $var2, $var3);
- DSELECT * FROM identifier($tbl_ref) WHERE ID IN Cvarl','var2','var3');
- ESELECT * FROM $tb1_ref WHERE $col_ref IN ($var1, Svar2, Svar3);
How the community answered
(35 responses)- A14% (5)
- B74% (26)
- C9% (3)
- D3% (1)
Explanation
The correct answer is B and E because they use the correct syntax and values for the identifier function and the session variables. The identifier function allows you to use a variable or expression as an identifier (such as a table name or column name) in a SQL statement. It takes a single argument and returns it as an identifier. For example, identifier($tbl_ref) returns EMP_TBL as an identifier. The session variables are set using the SET command and can be referenced using the $ sign. For example, $var1 returns Name1 as a value.
Topics
Community Discussion
No community discussion yet for this question.