Professional Documents
Culture Documents
Subject: Relational Database Management System (RDBMS) : Syntax
Subject: Relational Database Management System (RDBMS) : Syntax
Example:
Output:
No. of Accounts
---------------------
10
COUNT(*) Returns the number of Syntax:
rows in the table,
including duplicates COUNT(*)
and those with nulls.
Example:
: 1
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Output:
No. of Records
-----------------------
10
MAX Returns the maximum Syntax:
value of expr.
MAX([<DISTINCT> | <ALL>] <expr>)
Example:
Example:
Output:
Maximum Balance
-----------------------
2000
Output:
Absolute
------------
15
POWER(m,n) Returns m raised to Syntax:
the nth power. N must
be an integer, else an POWER(m,n)
error is returned.
: 2
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Example:
Output:
Raised
----------
9
ROUND Returns n, rounded to Syntax:
m place to the right of
a decimal point. If m is ROUND(n[,m])
omitted, n is rounded
to 0 places. M can be Example:
Numeric negative to round off
Function digits to the left of the SELECT ROUND(15.19,1) “Round” FROM DUAL;
decimal point. m must
be an integer.
Output:
Round
----------
15.2
Example:
Output:
Square Root
-----------------
5
EXP Returns e raised to the Syntax:
nth power, where
e=2.71828183 EXP(n)
Example:
Output:
Exponent
-----------------
148.413159
: 3
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Example:
Example:
: 4
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
: 5
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Example:
Example:
Example:
Example:
: 6
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Output:
Capitalised
-------------------
MS. CAROL
: 7
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
UNISTR(‘\0302’) circumflex(^)
UNISTR(‘\0303’) tilde(~)
UNISTR(‘\0308’) umlaut(“)
Output:
Composed
-------------------
`a
Output:
Decomposed
-------------------
a`
Example:
Output:
Instr1 Instr2
-------------------
8 14
: 8
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Output:
Chang
----------
7sct5a9
Output:
LTRIM
-----------
ISHA
: 9
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Output:
RTIM
----------
SUNIL
Example:
Output:
Remove prefixes N suffixes
-------------------
Hansel
Example:
: 10
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Output:
Remove string
-------------------
23Hansel12
: 11
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
to a NUMBER Example:
datatype.
UPDATE ACCT_MASTR SET Curbal= Curbal+
Conversion TO_NUMBER(SUBSTR(‘$100’,2,3));
Function
Output:
10 rows updated.
: 12
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Output:
New Date Format
------------------------
January 05, 2003
: 13
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
: 14
Subject: RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)
Output:
Trim both sides
-------------------
30-JUN-04
: 15