Computer Science, asked by shazebsiddiqui84, 1 year ago

30. Write SQL commands to answer the queries based on COMPANY table
Emp_Code Name
101
Ravi
Salary
25000
102
Neelam
22000
Dept Joining_Date
Clerk 2010-10-10
Clerk
2013-06-04
Accountant 2011-03-02
Supervisor 2009-05-01
103
104
Ruchi
Ranjan
28000
30000
105
Sapna
21000
Accountant 2008-04-03
i) To display the details of those employees whose department is clerk.
ii) To update the details of those employees whose Dept is supervisor by increasing salary
3000.
iii) To display the employee code, name and salary of all employees.
iv) Display the details of employees in descending order.
v) Insert the record (106, 'Aditya', 32000. 'Marketing', 2012-10-15).​

Answers

Answered by kittushanrobotics200
2

Answer:

(i)select*from COMPANY where Dept Joining= 'Clerk';

(ii)update COMPANY set Salary = salary+3000;

(iii)select Emp_Code, Name, Salary from COMPANY;

(iv)if the question is to display employees code in descending order then,

   select*from COMPANY order by 'Emp_Code" DSC;

(v)insert into COMPANY(Emp_Code, Name, Dept joining, Date , salary) values (106, 'aditya', 'Marketing', 2012-10-15, 32000)

Similar questions