Professional Documents
Culture Documents
Name:-Kaushal Kumar Ganesh Reg. No.: - 11916381 Course: - CAP280 CA2
Name:-Kaushal Kumar Ganesh Reg. No.: - 11916381 Course: - CAP280 CA2
First create the table and insert the values for both the given table, then to list the Empno, Ename, Sal,
Daily sal of all emps in the asc order of Annsal do the following :-
select empno ,ename ,sal,sal/30,12*sal annsal from emp order by annsal asc;
Q.N.5 Answer:-
To List all the emps except ‘PRESIDENT’ & ‘MGR” in asc order of Salaries we have to do the following:-
select * from emp where job not in ('PRESIDENT','MANAGER') order by sal asc;
Q.N.23 Answer:-
As there is no Exp, Dname and grade in the emp table we have to add three columns and put values in
them, to do so we have to alter and update the table.
ALTER TABLE emp ADD exp int;