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
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
SELECT LPAD (salary,10,’*’)
FROM EMP
WHERE EMP_ID = 1001;
should have single quote
Also the answer should be : *****17000
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.
should be E
Answer should be option E, as there should be single quotation mark on both side of * symbol.
yes… tested is error… if * will be ‘*’ the result is *****17000 – also tested
E