what is displayed?

Evaluate the SQL statement:
SELECT LPAD (salary,10,*)
FROM EMP
WHERE EMP_ID = 1001;
If the employee with the EMP_ID 1001 has a salary of 17000, what is displayed?

Evaluate the SQL statement:
SELECT LPAD (salary,10,*)
FROM EMP
WHERE EMP_ID = 1001;
If the employee with the EMP_ID 1001 has a salary of 17000, what is displayed?

A.
17000.00

B.
17000*****

C.
****170.00

D.
**17000.00

E.
an error statement



Leave a Reply 6

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


Argha

Argha

SELECT LPAD (salary,10,’*’)
FROM EMP
WHERE EMP_ID = 1001;
should have single quote

Also the answer should be : *****17000

Justyna

Justyna

First of all there is mistake in the select statement. It should be:

SELECT LPAD (salary,10,’*’) FROM EMP WHERE EMP_ID = 1001;

If the question is written correctly then the answer is D because there are missing single quotation marks.

xuzhiyuan

xuzhiyuan

should be E

Sagar

Sagar

Answer should be option E, as there should be single quotation mark on both side of * symbol.

priest

priest

yes… tested is error… if * will be ‘*’ the result is *****17000 – also tested