Results 1 to 3 of 3

Thread: How DUAL diplays strings of length more than 1

  1. #1
    Geek_Guest
    Guest

    How DUAL diplays strings of length more than 1

    DUAL table has structure as
    DUMMY varchar2(1)
    so how it is diplaying strings of length more than 1 (like SELECT '12345' from DUAL ?

    Question asked by visitor Niloy Chaudhury


  2. #2
    Expert Member
    Join Date
    Jun 2006
    Answers
    410

    Re: How DUAL diplays strings of length more than 1

    you need to understand that you can also have literals in your select clause. Actually '12345' is a literal not a column value.
    For instance in the following query displays the current server date,

    select sysdate from dual;

    you can display sysdate by using other tables

    select sysdate from employees;

    But the above query is going have as many records in the table. For example if the employee table has 10 records then the later query display sysdate 10 times. This is what the use of DUAL table.


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: How DUAL diplays strings of length more than 1

    Dual is a special table which is availabe in all the schemas by default and user can execute any perdefined or user defined function on this table including any arithmetic operations.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact