Oracle PL/SQL/Table/DUAL Table
Версия от 13:45, 26 мая 2010; (обсуждение)
Do simple calculation by using dual
SQL>
SQL> select 123 * 456 from dual;
123*456
----------
56088
SQL>
SQL> select sysdate from dual;
SYSDATE
----------
26-10-2009
SQL>
SELECTING FROM DUAL
SQL>
SQL> DESC DUAL;
Name Null? Type
----------------------------------------------------------------------------------------------------------------------------------------------- -------- ------------------------------------------------------------------------------------------------
DUMMY VARCHAR2(1)
SQL> SELECT * FROM DUAL;
D
-
X
1 row selected.
SQL>
SQL> SELECT 18*1.05 FROM DUAL;
18*1.05
----------
18.9
1 row selected.
SQL>
SQL> select "ABC" from dual;
"AB
---
ABC
1 row selected.
SQL>
SQL> select "A" || "B" from dual;
"A
--
AB
1 row selected.
SQL>
The DUAL Table
SQL>
SQL>
SQL> --The DUAL Table
SQL>
SQL> DESC dual;
Name
-----------------------------
DUMMY
SQL>