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
想请教各位大虾们,我觉得这题选D,为什么答案是E呢,还请不吝赐教。
------解决方案--------------------------------------------------------
- SQL code
--正解为SELECT LPAD(salary,10,'*')FROM EMPWHERE EMP_ID = 1001;--*是字符,需要单引号
------解决方案--------------------------------------------------------