Dual:
v DUAL
is a table automatically created by oracle database along with the data
dictionary.
v Dual
is the schema of the user sys but is accessible by the name DUAL to all users.
v It
has only one column, DUMMY, defined by varchar2(1), and contains one row with a
value X.
Select *
from Dual;
DUMMY |
X |
v Selecting
from the dual table is useful for computing a constant expression with the
select statement. Because Dual has only one row, the constant is returned only
once.
Example: 1
Computation operation:
Select 5+5 from Dual;
Output:
5+5 |
10 |
Example: 2
Select (500*2*10.5)/100 result from Dual;
Output:
RESULT |
105 |
Find the
user:
Select user from dual;
Output:
USER |
APPS |
Find current date:
Select sysdate from dual;
How can you print string in the pyramid structure?
Output:
No comments:
Post a Comment