You are on page 1of 4

Lab 6(Graded)

(Database System Lab)

Submitted To:

Sir Imran Khalil

Submitted By:
Name: Talha Ahmad Bin Shafqat
Roll No: F2019266302
Section: V1

Q1

select * from job where JOB_CODE =510


Q2

update EMPLOYEE set JOB_CODE =501 where emp_num= 107;

Q3

update assignment set proj_num ='18 '


where EMP_NUM =(select EMP_NUM from EMPLOYEE where JOB_CODE
=500)

Q4

select * from employee


where EMP_LNAME='Smith'

Q5

select proj_name,proj_value,proj_balance
,employee.emp_lname,emp_fname,emp_initail,
employee.job_code,job.job_description,job.job_chg_hour
from job join on
employee.jobcode=job.job_code=project.emp_num

Q6

order by emp_lname

Q7

select max( proj_num )from assignment

Q8

update assignment
assignchg_hr*assign_hour

Q9
select emp,num,emp_lname,sum(assign_hour) , sum (assign_charge) from
employee right join employee on
employee.emp_num=assignment.emp_num

Q10

select sum(assign_hour) , sum (assign_charge) from assignment

Q11

update Assignment set assign_chg_hr*2


from Assignment join Employee
on
Assignment.emp_num = Employee.emp_num
where EMP_Years > 10;

Q12

select * from EMPLOYEEwhere EMP_HIREDATE = (select min(emp_hiredate)


from EMPLOYEE

Q13

select * from PROJECTwhere PROJ_VALUE = (select max(PROJ_VALUE) from


PROJECT)

Q14

select * from Job


where job_chg_hour > 80

Q15

select proj_val
from Project join Employee
on
employee.emp_num = project.emp_num
where emp_fname = ‘David’;
Q16

delete from project


where proj_num = 18

You might also like