What is dual in Oracle?

Source: Internet
Author: User

1. Dual is indeed a table. is a table that has only one field and a single row of records .
2. In practice, we call it ' pseudo-table '. Because he doesn't store subject data.
3. His presence is for the convenience of operation. Because select is intended to have a specific object.
such as: SELECT * from MyTable;
select * from MyView;
and so on.
But if we do not need to get the table data from the specific table, but simply to get some information we want, and to complete through select, we have to use an object, this object is dual;
if we want to calculate the value of 999*999, we can use:
select 999*999 from dual;
to achieve;
to splice a phone message:
Select Concat (' 010-', ' 88888888 ') | | ' Ext. 23 ' Gao Hu call from dual;

it becomes the format output that we want.

4. Of course, we do not have to dual, or we can do so. For example:
CREATE TABLE mydual (dummy varchar2 (1));
you can also achieve and dual the same effect:
select 999*999 from mydual;
However, dual we are accustomed to, it is unnecessary to do a set of their own.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.