Loops Are Resolved by Alias Table.
Loops Are Resolved by Alias Table.
ABS(2343)
----------
2343
SQL> ed
Wrote file afiedt.buf
ABS(-2343)
----------
2343
SQL> ed
Wrote file afiedt.buf
SIGN(324)
----------
1
SQL> ed
Wrote file afiedt.buf
SIGN(-324)
----------
-1
SQL> ed
Wrote file afiedt.buf
1* select sign(-0) from dual
SQL> /
SIGN(-0)
----------
0
SQL> ed
Wrote file afiedt.buf
SQRT(4)
----------
2
SQL> ed
Wrote file afiedt.buf
MOD(4,2)
----------
0
SQL> ed
Wrote file afiedt.buf
POWER(4,2)
----------
16
STRING
SQL> select upper('rajesh') from dual;
UPPER(
------
RAJESH
SQL> ed
Wrote file afiedt.buf
LOWER(
------
rajesh
SQL> ed
Wrote file afiedt.buf
SQL> ed
Wrote file afiedt.buf
LENGTH('RAJESH')
----------------
6
SQL> ed
Wrote file afiedt.buf
REVERS
------
hsejar
SQL> ed
Wrote file afiedt.buf
CONCAT('RAJE
------------
rajeshpolasu
SQL> ed
Wrote file afiedt.buf
1 select 'rajesh'||'
2* skker' from dual
SQL> /
'RAJESH'||'S
------------
rajesh
skker
SQL> ed
Wrote file afiedt.buf
'RAJESH'||'
-----------
rajeshskker
SQL> ed
Wrote file afiedt.buf
REPLACE('
---------
r$j$reddy
SQL> ed
Wrote file afiedt.buf
REPLACE('RA
-----------
r$$j$$reddy
SQL> ed
Wrote file afiedt.buf
1* select replace('rajareddy','aj','$$') from dual
SQL> /
REPLACE('
---------
r$$areddy
SQL> ed
Wrote file afiedt.buf
TRANSLATE
---------
r$$$reddy
SQL> ed
Wrote file afiedt.buf
TRANSLAT
--------
raareddy
SQL> ed
Wrote file afiedt.buf
TRANSLATE
---------
rarareddy
SQL> ed
Wrote file afiedt.buf
1* select replace('rajareddy','aj','ar') from dual
SQL> /
REPLACE('
---------
rarareddy
SQL> ed
Wrote file afiedt.buf
SUBST
-----
reddy
SQL> ed
Wrote file afiedt.buf
SU
--
re
SQL> ed
Wrote file afiedt.buf
INSTR('RAJAREDDY','A',1,1)
--------------------------
2
SQL> ed
Wrote file afiedt.buf
1* select instr('rajareddy','a',1,2) from dual
SQL> /
INSTR('RAJAREDDY','A',1,2)
--------------------------
4
SQL> ed
Wrote file afiedt.buf
INSTR('RAJAREDDY','A',3,2)
--------------------------
0
SQL> ed
Wrote file afiedt.buf
INSTR('RAJAREDDY','A',3,1)
--------------------------
4
SQL> ed
Wrote file afiedt.buf
LPAD('SAI'
----------
$$$$$$$sai
SQL> ed
Wrote file afiedt.buf
1* select rpad('sai',10,'$') from dual
SQL> /
RPAD('SAI'
----------
sai$$$$$$$
LENGTH('RAJESH')
----------------
7
SQL> ed
Wrote file afiedt.buf
LENGTH(TRIM('RAJESH'))
----------------------
6
SQL> ed
Wrote file afiedt.buf
LENGTH(LTRIM('RAJESH'))
-----------------------
6
SQL> ed
Wrote file afiedt.buf
LENGTH(RTRIM('RAJESH'))
-----------------------
7
SQL>
GROUP FUNCTIONS
SUM(SAL)
----------
29025
SQL> ed
Wrote file afiedt.buf
MIN(SAL)
----------
800
SQL> ed
Wrote file afiedt.buf
MAX(SAL)
----------
5000
SQL> ed
Wrote file afiedt.buf
COUNT(SAL)
----------
14
SQL> ed
Wrote file afiedt.buf
AVG(SAL)
----------
2073.21429
SQL> ed
Wrote file afiedt.buf
COUNT(*)
----------
14
SQL> ed
Wrote file afiedt.buf
COUNT(EMPNO)
------------
14
SQL> ed
Wrote file afiedt.buf
COUNT(COMM)
-----------
4
SQL>
SQL> ed
Wrote file afiedt.buf
SUM(COMM)
----------
2200
SQL>
DATE
SQL> SELECT SYSDATE FROM EMP;
SYSDATE
---------
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
12-JAN-07
14 rows selected.
SYSDATE
---------
12-JAN-07
SQL> ED
Wrote file afiedt.buf
SYSDATE+1
---------
13-JAN-07
SQL> ED
Wrote file afiedt.buf
ADD_MONTH
---------
12-NOV-07
SQL> ED
Wrote file afiedt.buf
1* SELECT ADD_MONTHS(SYSDATE,-10) FROM DUAL
SQL> /
ADD_MONTH
---------
12-MAR-06
MONTHS_BETWEEN(SYSDATE,HIREDATE)
--------------------------------
312.855646
310.758871
310.694355
309.339517
303.500807
308.371775
307.11371
236.791129
301.855646
304.145968
235.662097
301.307258
301.307258
299.662097
14 rows selected.
SQL> ED
Wrote file afiedt.buf
LAST_DAY(
---------
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
31-JAN-07
14 rows selected.
SQL> ED
Wrote file afiedt.buf
LAST_DAY(
---------
31-DEC-80
28-FEB-81
28-FEB-81
30-APR-81
30-SEP-81
31-MAY-81
30-JUN-81
30-APR-87
30-NOV-81
30-SEP-81
31-MAY-87
31-DEC-81
31-DEC-81
31-JAN-82
14 rows selected.
NEXT_DAY(
---------
22-DEC-80
23-FEB-81
23-FEB-81
06-APR-81
05-OCT-81
04-MAY-81
15-JUN-81
20-APR-87
23-NOV-81
14-SEP-81
25-MAY-87
07-DEC-81
07-DEC-81
25-JAN-82
14 rows selected.