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

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

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

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

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

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

D.
SELECT &1, ‘&2’
FROM &3
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 EMPLOYEES
Refer : Introduction to Oracle9i : SQL, Oracle University Student Guide, Producing Readable
Output with iSQL*PLUS, p. 7-8



Leave a Reply 1

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