Unit-2 Final
Unit-2 Final
https://easy2learncode.in
22
RDBMS Using Oracle unit-2
Syllabus:-
Creating , Altering & Dropping tables
Create:-
Syntax :
Create table table_name
(
colums1 datatype(size),
colums2 datatype (soze),
… … … )
Ex.: create table student (roll number(5),name
varchar2(10),salary number(10))
ALTER :-
Syntax :
Alter table table_name ADD(column_name)
https://easy2learncode.in Page 2
RDBMS Using Oracle unit-2
INSERT :-
Syntax :
Insert into table_name values
( val_1,val_2,……)
UPDATE :-
Syntax:
Update table_name SET columsname where
columename.
DELETE :-
Syntax :
Delete from table_name where record_name
Truncate:-
Remove table record
Syntax :
Truncate table table_name
https://easy2learncode.in Page 3
RDBMS Using Oracle unit-2
RENAME:-
Newname of Tablename
Syntax :
Rename old table_name to new table_name
SQL QUERY
To table discribe
Ex. Desc student.
To deleting a column
Ex. alter table student drop column salary
ARITHMETIC OPERATOR
They are arithmetic operator are +, -, and *.
Addition:
Ex. select name,salary +5000 from student where
id=1
Substraction:
Ex. select name,salary -2000 from student where
id=1
Multiplication:
Ex. select name,salary *500 from student where
id=2
LOGICAL OPERATORS
They are logical operator are AND,OR,NOT.
AND:
Ex. select *from student where name='aaa' AND
salary=2000
https://easy2learncode.in Page 5
RDBMS Using Oracle unit-2
OR:
Ex. select *from student where id=2 OR
salary=2000
NOT:
Ex. select *from student where id NOT LIKE 2
NOT IN :
Ex. select *from student where name NOT
IN('aaa','bbb','ccc')
BETWEEN OPERATOR
Ex. select *from student where name between 'aaa' and 'fff‘
Ex. select *from student where id between 1 and 5
Built in functions
Function use:
-performing arithmetic and general
calculation on data,
-converting or transformation data,
-modifying individual data,
https://easy2learncode.in Page 6
RDBMS Using Oracle unit-2
(1) lower()
select lower ('DHANAK COLLEGE')
"lowercase" from dual;
o/p:dhanak college
(2) upper()
select upper('dhanak college')"uppercase"
from dual;
o/p:DHANAK COLLEGE
(3)INITCAP()
select INITCAP ('oracle database') "capital"
from dual;
o/p:Oracle Database
https://easy2learncode.in Page 7
RDBMS Using Oracle unit-2
(4)SUBSTR()
select SUBSTR ('SubString',3,5) "substring"
from dual;
o/p:bStri
(5)LPAD()
select LPAD ('Program',10,'*') "LPAD" from
dual;
o/p:***Program
(6)RPAD()
select RPAD ('Program',11,'*') "RPAD" from
dual;
o/p:Program****
(7)LTRIM()
https://easy2learncode.in Page 8
RDBMS Using Oracle unit-2
(8)RTRIM()
select RTRIM ('PROGRAM','M') "RTRIM"
from dual;
o/p:PROGRA
(9)Ascii()
It return a numeric value base on given
character.
select ascii('D') from dual; o/p=68
select ascii('h') from dual; o/p=104
(10)Length()
select length ('Dhanak College') from dual;
https://easy2learncode.in Page 9
RDBMS Using Oracle unit-2
o/p=14
(11)INSTR()
It find a position of character in a string,
finding start to bigining of a string.
select INSTR ('This a Program' , 'a') from
dual;
o/p:6
1. (12) CHR()
Return the character based on the number
code.
Syntax : CHR(n)
Example: select CHR(67)||CHR(65)||CHR(84)
FROM DUAL;
OUTPUT : CAT
(13) CONCAT()
https://easy2learncode.in Page 10
RDBMS Using Oracle unit-2
(14) REPLACE()
REPLACES a sequence of characters in a
string with another set of characters.
Syntax:
REPLACE(char, search_string [,
replacement_string ] )
Ex., select replace('DHANAK ','K','C')from
dual;
https://easy2learncode.in Page 11
RDBMS Using Oracle unit-2
(15) SOUNDEX()
This Function Is Used To Get Soundex
Value, It Returns A Character String
Containing The Phonetic Representation Of
Char.
SYNTAX : SOUNDEX(CHAR)
CHAR :A String Whose You Retrive
Soundex.
Ex., select SOUNDEX('DHANAK ')from dual;
(16) TRIM
The Oracle TRIM function is used to remove all
leading or trailing characters (or both) from a
character string.
Syntax:
TRIM([ { { LEADING | TRAILING | BOTH }
[ trim_character ]
| trim_character
}
FROM
]
trim_source
)
https://easy2learncode.in Page 12
RDBMS Using Oracle unit-2
(2)MIN()
select MIN(salary) from employee;
o/p:20000
(3)MAX()
https://easy2learncode.in Page 13
RDBMS Using Oracle unit-2
(4)SUM()
select sum(salary) from employee
where empno=1;
select sum(salary) from employee;
o/p: Total salary display
(5)AVG()
select AVG(salary) from employee;
o/p: avg to the table
(1)ABS()
select ABS(-15.11) "absolute" from dual;
o/p:15.11
(2)power()
select power(15,2) "raised" from dual;
o/p:225
(3)round()
https://easy2learncode.in Page 14
RDBMS Using Oracle unit-2
(4)SQRT()
select sqrt(225) "squre root" from dual;
o/p:15
(5)MOD()
select mod(15,7) "mod" from dual;
o/p:1
(6)FLOOR()
select FLOOR(24.8) "floor" from dual;
o/p:24
(7)CEIL()
select ceil(24.8) from dual;
o/p:25
(8)exp()
select exp(1) from dual;
o/p:2.718
(9)GREATEST()
https://easy2learncode.in Page 15
RDBMS Using Oracle unit-2
select greatest(10,10,1,3,44,55,0)from
dual;
o/p:55
(10)LEAST()
select least(10,10,1,3,44,55,0)from dual;
o/p:0
(11) cos()
Cos returns the cosine of any number.
Syntax: cos(n);
Select cos(180*3.14159265359/180)”
cosine of 180 degrees” from dual;
(12) decode()
syntax:
DECODE(expression , search_value , result ,
default[optional])
https://easy2learncode.in Page 16
RDBMS Using Oracle unit-2
(13) log
Log returns the logarithm, base n2 of n1.
Syntax: LOG(n2,n1);
Ex., select LOG(10,100) “log base 10 of 100”
from dual;
(14) log10()
Returns the base-10 logarithm of X.
Syntax: LOG10(X);
(15) max
MAX( expression );
Ex., select max(salary) from employee;
(16) min
MIN( expression );
Ex., select MIN(salary) from employee;
(17) sign()
https://easy2learncode.in Page 17
RDBMS Using Oracle unit-2
Syntax:
SIGN(n)
Ex., SELECT SIGN(-145), SIGN(0),
SIGN(145) FROM dual;
o/p :
https://easy2learncode.in Page 18
RDBMS Using Oracle unit-2
(18) sin()
SIN returns the sine of n.
Syntax: SIN(n);
Ex., select SIN(30*3.14159265359/180)
"sine of 30 degree" FROM dual;
o/p: 0.5000
(20) sinh()
SINH returns the hyperbolic sine of n.
Syntax: SINH(n);
Ex., select SINH(1) "hyperbolic sine of 1"
from dual;
o/p: 1.17520119
(21) tan()
Returns the tangent of a number
Syntax : TAN(numeric expression)
Ex., select TAN(0.52) from dual;
o/p., 0.572561
(22) trunk()
The TRUNC(number) function returns n1
truncated to n2 decimal places.
If n2 is omitted, then n1 is truncated to 0
places. N2 can be negative to truncate(make
zero) n2 digits left of the decimal point.
https://easy2learncode.in Page 19
RDBMS Using Oracle unit-2
Syntax : TRUNC(n1,n2);
Ex., select TRUNC(15.79,1) "TRUNCATE"
FROM DUAL;
o/p : 15.7
(1)to_date()
It is used to convert a string to a date
formate.
Syntax:
TO_DATE ( string, format )
Example.
Example:
TO_DATE ('062619', 'MMDDYY')
Output:
date value of June 26, 2019
select to_date(sysdate,'dd-mm-yy') from dual;
o/p: System Date return
(2)add_months()
This function returns a date with a given
number of months added (date plus integer
months)
https://easy2learncode.in Page 20
RDBMS Using Oracle unit-2
(3)last_day()
THIS function returns the last day of the
month that contains a date. The return type
is always DATE.
https://easy2learncode.in Page 21
RDBMS Using Oracle unit-2
(4)months_between()
This function is used to get the number of
months between dates (date1, date2).
https://easy2learncode.in Page 22
RDBMS Using Oracle unit-2
(5)next_day()
NEXT_DAY() returns the date of the first
weekday that is later than the date.
https://easy2learncode.in Page 23
RDBMS Using Oracle unit-2
Ex.,
select next_day(sysdate,'sunday')from dual;
o/p:09-AUG-15
select next_day('22-august-20','wednesday')
from dual;
o/p : 26-aug-20
(6)round()
The ROUND() function is used to get the
date rounded to the unit specified by the
format model. It operates according to the
rules of the Gregorian calendar.
https://easy2learncode.in Page 24
RDBMS Using Oracle unit-2
Ex.,
select round(sysdate,'Month')from dual;
select round(sysdate,'year')from dual;
(7)sysdate()
The SYSDATE() function is used to get the
current date for the operating system.
There have no parameter.
https://easy2learncode.in Page 25
RDBMS Using Oracle unit-2
Syntax: SYSDATE()
select SYSDATE from dual;
(8)systimestamp()
The SYSTIMESTAMP() function is used to get
the system date, including fractional seconds
and time zone, of the system.
Syntax:
SYSTIMESTAMP()
Ex., select systimestamp from dual;
0/p:07-AUG-15 03.01.27.541000 PM
+05:30
(9)To_date()
It is used to convert a string to a date formate.
Syntax:
TO_DATE ( string, format_mask)
Example:
TO_DATE ('062619', 'MMDDYY')
Output:
date value of June 26, 2019
(10)trunc (date)
The TRUNC (date) function is used to get the date with the
time portion of the day truncated to a specific unit of
measure. It operates according to the rules of the
Gregorian calendar.
https://easy2learncode.in Page 26
RDBMS Using Oracle unit-2
Syntax:
TRUNC(date [, fmt ])
Parameters:
Name Description
date The date to truncate.
The unit of measure for truncating. If fmt is not
fmt
present, then the date is truncated to the
(Optional)
nearest/present day.
(11)to_char
The TO_CHAR( ) function is used to convert a datetime datatype to a
value of VARCHAR2 datatype in a specified format.
https://easy2learncode.in Page 27
RDBMS Using Oracle unit-2
Syntax:
TO_CHAR( datetime , fmt )
Parameters:
Name Description
datetime A date that will be converted to a string.
The format that will be used to convert the value to
a string.
https://easy2learncode.in Page 28
RDBMS Using Oracle unit-2
constraints
PRIMARY KEY FOREIGN KEY NOT NULL UNIQUE KEY CHECK DEFAULT
Constraints are:
1. NOT NULL
2. UNIQUE
3. PRIMARY KEY
4. FOREIGN KEY
5. CHECK
6. DEFAULT
1. NOT NULL
o NULL means empty, i.e., the value is not available.
o Whenever a table's column is declared as NOT NULL, then
the value for that column cannot be empty for any of the
table's records.
o There must exist a value in the column to which the NOT
NULL constraint is applied.
https://easy2learncode.in Page 29
RDBMS Using Oracle unit-2
NOTE: NULL does not mean zero. NULL means empty column,
not even zero.
https://easy2learncode.in Page 30
RDBMS Using Oracle unit-2
2. UNIQUE
o Duplicate values are not allowed in the columns to which
the UNIQUE constraint is applied.
o The column with the unique constraint will always contain
a unique value.
o This constraint can be applied to one or more than one
column of a table, which means more than one unique
constraint can exist on a single table.
Ex.,
CREATE TABLE student(StudentID INT UNIQUE, Student_First
Name VARCHAR(20), Student_LastName VARCHAR(20), Stude
nt_PhoneNumber VARCHAR(20), Student_Email_ID VARCHAR(
40));
https://easy2learncode.in Page 31
RDBMS Using Oracle unit-2
Ex.,
alter table student1 modify(StudentID int UNIQUE);
alter table student1 modify(Student_PhoneNumber
number(10) UNIQUE);
Ex. insert into student1
values('','andy','rubin',1234567891,'[email protected]');//error
3. PRIMARY KEY
o PRIMARY KEY Constraint is a combination of NOT NULL
and Unique constraints.
o NOT NULL constraint and a UNIQUE constraint together
forms a PRIMARY constraint.
o The column to which we have applied the primary
constraint will always contain a unique value and will not
allow null values.
https://easy2learncode.in Page 32
RDBMS Using Oracle unit-2
Example:
DESC student;
o/p :-
FOREIGN KEY
o A foreign key is used for referential integrity.
o When we have two tables, and one table takes reference
from another table, i.e., the same column is present in
https://easy2learncode.in Page 33
RDBMS Using Oracle unit-2
Example:
Example.
https://easy2learncode.in Page 34
RDBMS Using Oracle unit-2
Example.,
Example:
4. Show record
Select * from employee
5. CHECK
o Whenever a check constraint is applied to the table's
column, and the user wants to insert the value in it, then
the value will first be checked for certain conditions before
inserting the value into that column.
o For example: if we have an age column in a table, then
the user will insert any value of his choice. The user will
also enter even a negative value or any other invalid value.
But, if the user has applied check constraint on the age
column with the condition age greater than 18. Then in
such cases, even if a user tries to insert an invalid value
such as zero or any other value less than 18, then the age
column will not accept that value and will not allow the
user to insert it due to the application of check constraint
on the age column.
https://easy2learncode.in Page 36
RDBMS Using Oracle unit-2
Example:
Example:
CREATE TABLE student(StudentID INT, Student_FirstName VA
RCHAR(20), Student_LastName VARCHAR(20), Student_Phone
Number NUMBER(10), Student_Email_ID VARCHAR(40), Age N
UMBER CHECK( Age <= 15));
Ex.
insert record:-
https://easy2learncode.in Page 37
RDBMS Using Oracle unit-2
6. DEFAULT
Whenever a default constraint is applied to the table's column,
and the user has not specified the value to be inserted in it,
then the default value which was specified while applying the
default constraint will be inserted into that particular column.
Example:
Example :-
CREATE TABLE BCA(StudentID number(10), Student_FirstNam
e VARCHAR(20), Student_LastName VARCHAR(20), Student_Ph
oneNumber number(10), Student_Email_ID VARCHAR(40) DEF
AULT '[email protected]');
Example:-
DESC BCA;
insert into BCA (studentid,student_firstname,student_lastname,
student_phonenumber) values(2,'james','goslin',9929925125);
https://easy2learncode.in Page 38
RDBMS Using Oracle unit-2
SUBQUERY:
A query within query is known as Sub-Query. It is also
known as ‘Nested Query’.
You can have any number of sub-queries nested, oracle does
not place a limit.
The innermost query is executed first and output is utilized
to execute the outer query.
TYPES OF SUB-QUERY:
[1]Single-Row Subqueries:
Queries that return only one row from the inner(sub)
SELECT statement.
This is used to single-row operator. That is (= , > , >= , < , <= ,
<> )
Example .,
Solution :
[2]Multiple-Row Subqueries:
Queries that return more than one row from the inner(sub)
SELECT statement.
Operator Meaning
https://easy2learncode.in Page 39
RDBMS Using Oracle unit-2
Example :
Find the employees who earn the same salary as the minimum
salary for every department.
Solution:
SELECT emp_id, emp_nm FROM employees WHERE salary IN
(SELECT min(salary) FROM employees GROUP BY dept_id);
Syntax:
SELECT select_list FROM table_name WHERE
search_condition ;
Syntax:
Select column, group function(column)
From table_name GROUP BY column_nm;
https://easy2learncode.in Page 40
RDBMS Using Oracle unit-2
Example:
Select department,count(*) from student GROUP BY
department;
Syntax :
Select column_list from table_nm group by column_nm having
group_condition;
Syntax:
Select col_nm from table_nm [WHERE CLAUSE] ORDER BY
col_nm[ASC/ DESC];
Example:
Select * from student ORDER BY name;
https://easy2learncode.in Page 41
RDBMS Using Oracle unit-2
Syntax :
1. (col1, col2)
2. (group_total)
3. (grand total)
Example:
SELECT dept_id,emp_name,sum(emp_salary) FROM employee
GROUP BY ROLLUP(dept_id,emp_name);
https://easy2learncode.in Page 42
RDBMS Using Oracle unit-2
Syntax:
Example:
SELECT dept_id,emp_name,sum(emp_salary) FROM employee
GROUP BY CUBE(dept_id,emp_name);
SYNTAX :
SELECT DISTINCT column_1 FROM table;
Example :
SELECT DISTINCT student_firstname FROM student;
syntax:
operator ANY ( subquery)
Example:
select * from student where studentid =ANY(select studentid
from student where dept_id=104);
Syntax:
https://easy2learncode.in Page 43
RDBMS Using Oracle unit-2
https://easy2learncode.in Page 44
RDBMS Using Oracle unit-2
https://easy2learncode.in Page 45
RDBMS Using Oracle unit-2
SELF JOIN
https://easy2learncode.in Page 46
RDBMS Using Oracle unit-2
https://easy2learncode.in Page 47
RDBMS Using Oracle unit-2
https://easy2learncode.in Page 48
RDBMS Using Oracle unit-2
Ex. Select
e.empno,e.ename,e.job,d.dname,d.deptno
from emp e,dept d where e.deptno =
d.deptno(+)
RIGHT-OUTER Join
The right outer join can be used to
returns all the rows from the second
table even if there are no matches in the
first table.
Ex.
Select
e.empno,e.ename,e.job,d.dname,d.loc
from emp e,dept d where e.deptno(+) =
d.deptno
https://easy2learncode.in Page 49
RDBMS Using Oracle unit-2
Syntax:
SELECT a.column_name, b.column_name...
FROM table1 a, table1 b
WHERE a.common_filed = b.common_field;
Example: Oracle Self Join
The following SQL query uses a self join to
return the id of each employee along with
the id of the employee's manager.
Sample table: employee
https://easy2learncode.in Page 50
RDBMS Using Oracle unit-2
Create table:
create table employee (id number(10),name
varchar2(255), mngr_id number(10),
mngr_name varchar2(255));
insert record:
insert into employee values(10,'angel
patel',11,'riya sharma');
insert into employee values(11,'diya
patel',12,'sudhir maheta');
insert into employee values(101,'vinay
yadav',110,'krishna yadav');
insert into employee
values(1,'ganesh',10,'ram');
show record:
select * from employee;
Self join query:
select e1.name,e2.mngr_name from employee
e1, employee e2 where e1.id=e2.mngr_id;
https://easy2learncode.in Page 51
RDBMS Using Oracle unit-2
https://easy2learncode.in Page 52
RDBMS Using Oracle unit-2
UNION
UNION is used to combine the results of
two or more SELECT statements.
Ex.
Select dept_id from emp1 UNION select
dept_id from dept
https://easy2learncode.in Page 53
RDBMS Using Oracle unit-2
[2] intersect
Intersect operation is used to combine
two SELECT statements,
but it only retuns the records which are
common from both SELECT statements.
Ex.
Select emp_name from emp1 INTERSECT select
dept_name from dept
[3] minus
The Minus operation combines results of
two SELECT statements and return only
those in the final result, which belongs to
the first set of the result.
https://easy2learncode.in Page 54
RDBMS Using Oracle unit-2
Ex.
Select emp_id from emp1 MINUS select emp_id
from dept
General Functions
COALESCE
The Oracle COALESCE() function accepts a list of
arguments and returns the first non-null value.
Syntax:
COALESCE(exp1, exp2, ..., exp n)
In this syntax, the COALESCE() function returns the first
non-null expression in the list. It requires at least two
expressions.
In case all expressions evaluate to null, the function
returns null.
The following example returns 1 because it is the first
non-null argument:
SELECT COALESCE(NULL,1,2) result FROM dual;
https://easy2learncode.in Page 55
RDBMS Using Oracle unit-2
Return type:
If all arguments have the same data type, the COALESCE()
function returns a value of that data type.
If the arguments have different data types, the COALESCE
function implicitly converts all arguments to the data type
of the first non-null argument. In case the conversion fails,
then Oracle issues an error.
Use in table :student
Select id,name,city, COALESCE(mobile,telephone) from
student
Syntax
CASE [ expression ]
END
Example:
https://easy2learncode.in Page 56
RDBMS Using Oracle unit-2
SELECT
(CASE 'BCA'
WHEN 'BA' THEN 'BA STUDENT'
WHEN 'BCA' THEN 'BCA STUDENT'
WHEN 'B.Com' THEN 'B.Com STUDENT'
ELSE 'NOT A VALID FIELD'
END) As student
FROM dual;
Use in table :-
SELECT id,name,course,
(CASE course
WHEN 'BA' THEN 'BA STUDENT'
WHEN 'BCA' THEN 'BCA STUDENT'
WHEN 'B.Com' THEN 'B.Com STUDENT'
ELSE 'NOT A VALID FIELD'
END) As selected_course
FROM student;
Syntax :
create user username IDETIFIED by password
Ex :
[1] CREATE USER admin identified by
dhanak
Role
A role is a set(group) of privileges that can be granted
to users or to other roles.
It is a used for privilege management.
Roles are a collection of privileges or access rights.
Any combination of system privileges ,object
privileges ,and role privileges may be granted to a
role.
Ex.
Create role bca
grant create table,create view to bca
Grant bca to admin
DCL/TCL COMMAND
https://easy2learncode.in Page 58
RDBMS Using Oracle unit-2
GRANT
Grant Privileges on Table
You can grant users various privileges to
tables.
These privileges can be any combination
of SELECT, INSERT, UPDATE, DELETE,
REFERENCES, ALTER, INDEX, or ALL.
The Syntax for the GRANT command is:
GRANT privilege_name
ON object_name
TO {user_name}
https://easy2learncode.in Page 59
RDBMS Using Oracle unit-2
Revoke
The REVOKE command removes user access rights or
privileges to the database objects.
Syntax
REVOKE privileges ON object FROM user;
Ex.
REVOKE insert on emp from admin
REVOKE all on emp from admin
What is transaction?
1)commit
2)rollback
3)savepoint
[1]Commit
COMMIT command is used to permanently
save any transaction into the database.
A commit ends the current transaction and
makes permanent any changes made during
the transaction.
Ex. :
o Create table student(id
number(5),name varchar2(50),city
varchar2(50))
o Insert into student
values(1,'krupa','delhi');
o Insert into student
values(2,'ansh','bombay');
o Insert into student
values(3,'aaa','rajkot');
o commit
Rollback
A rollback exactly opposite of commit.
Recover the data in database.
https://easy2learncode.in Page 62
RDBMS Using Oracle unit-2
ROLLBACK;
savepoint
Save point marks and saves the current point In the
processing of a transaction.
Syntax :
SAVEPOINT savepoint_name;
Example:
CREATE TABLE emp_data ( no NUMBER(3), name
VARCHAR(50), code VARCHAR(12) );
SAVEPOINT table_create;
https://easy2learncode.in Page 63
RDBMS Using Oracle unit-2
SAVEPOINT insert_1;
SAVEPOINT insert_2;
ROLLBACK TO insert_1;
https://easy2learncode.in Page 64
RDBMS Using Oracle unit-2
Follow Us :
https://easy2learncode.in Page 65