Which SQL statement accepts user input for the columns …

Which SQL statement accepts user input for the columns to be displayed, the table name, and WHERE
condition?

Which SQL statement accepts user input for the columns to be displayed, the table name, and WHERE
condition?

A.
SELECT &1, “&2”
FROM &3
WHERE last_name = ‘&4’;

B.
SELECT &1, ‘&2’
FROM &3
WHERE ‘&last_name = ‘&4’ ‘;

C.
SELECT &1, &2
FROM &3
WHERE last_name = ‘&4’;

D.
SELECT &1, ‘&2’
FROM EMP
WHERE last_name = ‘&4’;

Explanation:
In a WHERE clause, date and characters values must be enclosed within single quotation marks.
Sample of the correct syntax
SELECT EMPLOYEE_ID, &COLUMN_NAME
FROM EMPLOYEESIncorrect Answers :
A:
Incorrect use of ” symbol
B:
Incorrect use of ‘ symbol
D:
No input for table name as EMP has been use in the statement.
Refer: Introduction to Oracle9i: SQL, Oracle University Student Guide, Producing Readable Output with
iSQL*PLUS, p. 7-8



Leave a Reply 0

Your email address will not be published. Required fields are marked *

5 − 1 =