Skip to main content

DUAL Table

The DUAL table was created by Charles Weiss of Oracle Corporation to provide a table for joining in internal views:
I created the DUAL table as an underlying object in the Oracle Data Dictionary. It was never meant to be seen itself, but instead used inside a view that was expected to be queried. The idea was that you could do a JOIN to the DUAL table and create two rows in the result for every one row in your table. Then, by using GROUP BY, the resulting join could be summarized to show the amount of storage for the DATA extent and for the INDEX extent(s). The name, DUAL, apt for the process of creating a pair of rows from just one.[1]
The original DUAL table had two rows in it (hence its name), but subsequently it only had one row.

Optimization

Beginning with 10g Release 1 Oracle Database have beenOPTIMIZED[2] and the database no longer performs physical or logical IO on the DUAL table even though the DUAL table still actually exists.
DUAL is readily available for all the users in database.


Courtesy: Wikipedia

Comments

Popular posts from this blog

Only native data types are supported in PLSQL programming

create or replace package check1 is procedure p1(a1 integer); procedure p1(a1 number); end check1; / create or replace package body check1 is procedure p1(a1 integer) as begin dbms_output.put_line('Using Integer'); end p1; procedure p1(a1 number) as begin dbms_output.put_line('Using Number'); end p1; end; / --The above code gets compiled successfully. --But when you try to execute it .. begin check1.p1(8779); end; --See what happens.............. This concludes ONLY different native datatypes can be used in PLSQL OO implementation. Happy learning!!!!!

Editor's Column - Traditional DBMS

Editor's column There were days when Rooms-sized processors used for processing data. IT boomed up at the start of 21st Century and so many innumerable inventions made Computer world and few among them are still up in the markets for thier better implemented programming Alogrithms which couples with computer hardware and software ( OS ). Textpads or notepads were the repository of data and programmers had to be Experts to do data manipulation. In other words, Programmers had to use thier own logic to do insert , delete, update in data source. For instance, Consider the following: file1.txt: 1 I am line number 1 2 I am line number 2 3 I am line number 3 4 I am line number 4 5 I am line number 5 6 I am line number 6 7 I am line number 7 8 I am line number 8 9 I am line number 9 10 I am line number 10 To programmatically delete 8 th record , developer had to use the following logic with OLD file handling methods in 3rd generation language. 1. Open file1.txt, an...

PLSQL programming - Part 1

Pre-requisite : Basic SQL Knowledge in Oracle and programming knowledge in any language Browse my blog to read the overview of PLSQL if you need it. Anonymous block ............. ........... This is where you declare Variables that you are going to use it in PLSQL block ............ Data types are chosen based on requirement. For example, if you want to process strings you go for data types of characters and for numeric operations Int, float , double or number. Begins ..... ......... ......... .......... This is where you implement programming logic and get the desired outcome. .......... .......... Ends..... We call it anonymous block because we don't name it or reference it. (Unlike Package, Stored procedure,& Other objects) Learn from examples Example 1: declare var1_num number; --Declaring number type variable var2_str varchar2; begin var1_num := 10; --Assigning 'Number' Value to the variable var2_str := 'I am a string value...