The "Dual Table" in Oracle

> The "DUAL" table is a one row and one column table. The owner of this table is "SYS" but it's accessible to all the db users. 

> It is having single column called as "DUMMY"

> It is used to test SQL expression with out querying to the main/real tables. 

Eg : 1> SELECT SYSDATE FROM DUAL;
O.P : It will print current date and time. 
    





2> SELECT 'Hello, Welcome to SQL' from DUAL;
O.P : 





3> SELECT 5*9 AS RESULT FROM DUAL;
O.P: 





#SQL #LEARNSQL #DUALTABLE

No comments:

Post a Comment

Infolinks In Text Ads