Employee Management System2[1]
Employee Management System2[1]
create table table_name ( column1 datatype (size), column2 datatype (size), ...
column n datatype (size)); example:
create table Employee( EmpId
number(15),
FirstName varchar2(15),
LastName varchar2(20),
Email varchar2(25),
PhoneNo varchar2(25),
Salary number(8)); output:
Empid First LastName Email PhoneNo salary
name
Syntax:
Example:
OR
output:
Empid First LastName Email PhoneNo department
name
syntax:
1]Insert command:
To add a record into the table .
syntax:
insert into tablename values (column 1,column2….column n);
example:
output:
Emp_i Firs LastName Email PhoneN departmen
d t o t
name
1 priy deshmukh [email protected] 567894 co
a m
20 Riya deshpand [email protected] 896754 ME
e
30 siya mane [email protected] 987654 EJ
update
command:
Delete command:
syntax:
1]grant
2]revoke
1]commit
2]rollback 1]commit
command:
department=’ME;
1]Group by clause
2]Having clause
3]order by clause
1]Group by clause:
2]Having clause:
3]order by clause:
joins:
Type of join:
1]Inner join
2]outer join
syntax:
102 20
103 30
104 50
dept:
dept_id Dept_name
10 co
20 Me
30 ej
40 ce
example:
102 20 me
103 30 ej
104 50 ce
outer join:
the sql left outer join return all the rows from the
left table even if there are no matches in the right
table null values are place of right table. syntax:
102 20 me
103 30 ej
right outer
join:
the sql right outer join return all the rows from the
left table even if there are no matches in the left
table null values are place of left table. syntax:
output:
Emp_id Dept_id Dept name
101 10 co
102 20 me
103 30 ej
NULL NULL Ce
conclusion: