You are on page 1of 5

.,.

PL- Sql operators:


-----oku---- ,---------
---- =-----66767---
-------..---.l---.,.---==
Arithmetical operators:
--- .,.---n-----./---, v,.----bb
+ addi,.tion
- subtrac,.t
* Multiplication
/ division (quotient).,.

Mathematical function
Mod(10,3) => 1

10+3=>13
10-3=7
10*3 =30
10/3 => 3.3333
MOD(10,3) =>1

Relational operators or Comparision operators:


-------------------------------------------
>
<
<=
>=
=
!= or <>

a>b

Logical operators:
------------------
and
or
not

and
a b c=a*b
0 0 0
0 1 0
1 0 0
1 1 1

Note : if all input values are true then output is true else false.

or
a b c=a+b
0 0 0
0 1 1
1 0 1
1 1 1

Note : if any one input values are true then output is true else false.

Not
a c
0 1
1 0

Special operators:
-------------------
in
not in
between
not between
like
not like
is null
is not null

Set operators:
--------------
union
union all
intersect
except /Minus

Assignment operators:
--------------------
:=
a:=100;
b:=200
c:=a+b;
d:='14-06-19'
e:='Ravi'

Concatenation operators(||)
--------------------------
'Sql'||'School' => SqlSchool

100 + 200 => 300

PLsql datatype or Column types or Fieldtypes:


--------------------------------------------
Character datatypes( a to z and 0 to 9)
-----------------------------------------
char(2000) - Fixed length char - Ascii - 1 byte - Static memory allocation - ANSI
syntax

varchar(2000) - Variant length char - Ascii - 1 byte - dynamic memory allocation -


ANSI syntax

varchar2(4000) - Variant length char - Ascii - 1 byte - Dynamic memory allocation -


Oracle syntax

Nchar(40) - Fixed length char - Unicode - 2 bytes - Static memory allocation

Nvarchar (40) - Variant length char - Unicode - 2 bytes - Dynamic memory


allocation.

Number datatypes:
----------------
number(10) -> 10digits
number(10,2) -> 9999999.99

int - 4 bytes -> 32 bits


or
INTEGER - 4 bytes -> 32 bits

Decimal point datatypes:


-----------------------
float - 4 bytes (Approx. 7 decimal digits)

Date and timestamp datatypes:


-----------------------------
date - 8 bytes -> by default date format -> 'dd-mm-yy'

timestamp - 14 bytes -> 'dd-mm-yy hh:mi:ss AM/PM'

Raw and Long Raw datatypes: (GUID,ROWID)


---------------------------------------
Raw - 4 bytes

long raw - 8 bytes

Large objects (LOB)


-------------------
Bfile - binary file - External
BLob - Binary large objects - Internal - image,mp3,videos
CLob - Character large object - Internal - text,document,data...

You might also like