P New
P New
EMPLOYEES TABLE:
desc employees
Location varchar(30));
desc Department
PROJECTS TABLE:
Location varchar(30),
DESC PROJECTS
QUERIES:
SIMPLE QUERIES:
1] List the emp who are working for the dept 1 and 2 .
From employees
From employees
3] List the enames that are starting with ‘S’ and with five characters.
Select E_Name
From employees
4] List the total information of Employee along with Dname and Loc of all the
Select *
Where e.D_no=d.D_no
Select distinct(Job)
From employees
desc projects
AGGREGATE FUNCTION
From employees
From employees
Group by D_no
3] Find the total annual salary for each job (distribute job wise) in previous
year.
From employees
Group by Job
4] List the names of the dept where more than 5 emps are working.
From employees
Group by D_no
Having count(E_Id)>=5
4] List the names of the dept where more than 5 emps are working.
From employees
Group by D_no
Having count(E_Id)<5
DELETE OPERATION
Rollback
UPDATE
Update Department
End
select * from Department
Update employees
Update employees
Where E_Id=1104
Select E_Name
from employees
CARTESIAN PRODUCT
NATURAL JOIN
Projects_Dept
COMPLEX QUERIES
Pune.
From projects