about literal in ocp
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: about literal in ocp

  1. #1
    Join Date
    Jul 2001
    Posts
    14
    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?

  2. #2
    Join Date
    Jan 2001
    Posts
    2,828

    Talking

    Hello Graci

    the answer is a & c coz a is a character literal and c is a numeric literal.

    regards
    hrishy

  3. #3
    Join Date
    Jul 2001
    Posts
    14
    HI hrishyC


    about C. Employee Name:, should it use quotes. "Employee Name:" as character literal?

    Thanks & Regards,
    Grace

  4. #4
    Join Date
    Apr 2001
    Posts
    16
    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
  •  



Click Here to Expand Forum to Full Width