-
In the following SQL statement, which one is a literal
SELECT 'Employee Name: '|| ename from emp where deptno=10;
A. 10
B. ename
C. Employee Name:
D. ||
The answer is C, but why not A?
-
Hello Graci
the answer is a & c coz a is a character literal and c is a numeric literal.
regards
hrishy
-
HI hrishyC
about C. Employee Name:, should it use quotes. "Employee Name:" as character literal?
Thanks & Regards,
Grace
-
Character literal is always quoted by single quotes.
Double quotes are used for column alias name, table name etc to keep the case format. Also if you want to use Oracle reserve words for naming (not recommended), you have to quote with double quotes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|