Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Dual Table in Oracle within the Oracle forums, part of the Databases category; What does a dual table in oracle do? Where will this table be use at?...
|
|||||||
| Oracle Oracle 9i & Oracle 10g Knowledge Base Learn and Share Oracle Technology related articles, white papers, tutorials / study materials, example codes, FAQ's, Tips and Tricks. |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
Re: Dual Table in Oracle
Dual table is like your scratch-pad. you can try different queries & functions using Dual.
For. E.g. if you want to find out max of any numbers that are not present in your schema & you want to do it, you can use dual this way : select max(12,54,2,75,142) from dual; when you are using some object which doesn't have any phisical reference to your database tables, i.e. it is not resided in any table, you can refer it to dual table. This fulfils the ORACLE's requirement of source table in FROM clause. Patrick.
Last edited by pat.mclean; 06-01-2006 at 07:47 AM. |
| The Following User Says Thank You to pat.mclean For This Useful Post: | ||
|
|||
|
Re: Dual Table in Oracle
Quote:
|
| The Following User Says Thank You to admin For This Useful Post: | ||
|
|||
|
Re: Dual Table in Oracle
Hi,
Some more words to add to dual table are the one column which is present in dual table is of type char and of size 1. There are many places in which dual takes its presence. One of the place in which dual is used is sequence values are selected by querying dual. Regards, RyanJames |
|
|||
|
Re: Dual Table in Oracle
Dual table is a Table created within SYS schema having public synonym this table is created with one cloumn and one row that is very usefull to use oracle Function in plsql without having real table in your schema
E.g If you want to get user name ,sysdate of Server,or etc function you can use this function |
|
|||
|
Re: Dual Table in Oracle
Quote:
it shows the error message invalid identifier anybody help me.... |
|
|||
|
Re: Dual Table in Oracle
Quote:
GREATEST(12,54,2,75,142) ------------------------ 142 Max function takes only one parameter. SQL> SELECT max(sal) FROM EMP; MAX(SAL) --------- 9350 Last edited by krishnaindia2007; 10-06-2008 at 02:19 AM. |
|
|||
|
Re: Dual Table in Oracle
Quote:
U can testthing with this DUAL Ex. select * from DUAL; O/P : X |
|
|||
|
Re: Dual Table in Oracle
Dual table is basically used for pseudo columns like my_seq.nextval,curval, level and also to display system date. it contains one row and one column.
|
|
|||
|
Re: Dual Table in Oracle
DUAL table useful, for example, to generate sequence of numbers, like this:
SELECT level as ID FROM DUAL CONNECT BY level < 101 Will give you seqence of numbers 1..100 |
|
|||
|
Quote:
In SQL Server, there exists no 'dual' table. Instead you can query in SQL Server like 'select 2*2' will give you the required output. {PFA the image file 1.jpg} for the output in the SQL Server. ![]() (No Column Name) ------------------ 4 |
|
|||
|
Re: Dual Table in Oracle
Dual table is generally used for the completeness of SELECT clause syntax, cause select and from clauses are mandatory but many calculations do not need to select from actual table.
e.g. select 5*9 from dual; |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Oracle Interview Questions Free E-Book | admin | Downloads | 308 | 13 Hours Ago 06:06 AM |
| Creating a table by copying another table's structure | Allan Paul | Oracle | 19 | 04-17-2009 06:03 AM |
| What is Oracle Net Services | GeekAdmin | Oracle | 2 | 02-15-2007 06:02 AM |
| Transaction in Oracle Server | janelyn | Oracle | 2 | 10-13-2006 07:03 PM |
| Type of Table for Extension Colums | RyanJames | Oracle Apps | 0 | 05-31-2006 10:58 PM |