Professional Documents
Culture Documents
Bhavesh ISM Practical File
Bhavesh ISM Practical File
ISM Lab
Practical File
output
Q10 Explain Query of select from emp where
job in(‘clerk’,’manager’,’salesman’)and show
output?
Query
select * from emp where job in(‘clerk’,’manager’,’salesman’);
output
Q26 Explain query of insert into dept values (‘sales’,so,’mumbai’) and show Output
Query
insert into dept values ( so , ‘sales’ , ’mumbai’);
output
Q 27 Explain Query of select lower ename from emp?
Query
select lcase(ename) from emp;
output
output
Q 38 Explain query of select ename,pname from emp ,dept
where emp.deptno=dept.deptno?
Query
select ename,pname from emp ,dept
where emp.deptno=dept.deptno;
Output
Q 39 Explain Query of Non-Null Constraint with the help of table.
Quary
CREATE TABLE EMP (
EMPID int NOT NULL,
EMPLastName varchar(255) NOT NULL,
EMPFirstName varchar(255) NOT NULL,
Age int);
Output
Q40 Explain Add Constraint With the help of Alter Table Statement .
Quary
ALTER TABLE Emp
Add column Departno Number, PhoneNo Number;
Output :-
Q 41 Explain Quary of Delete/Drop a Column With the help of Table.
Quary
ALTER TABLE Emp
Drop Column Phoneno;
Output
Quary
Delete From Emp where Salary<15000;
Output:-
Q 43 Insert The Data with the help of quary
Quary:-
Insert into Emp Values ( 12222,'Mithlesh',20,'Goa',90000);
Output:-
Quary:-
Update emp
set salary=100000
where ename='Bhavesh';
Q45 Explain NVL Function with the help of Quary.
Table:-
Quary:-
If we write this Quray
Notice that if any column value in an expression is NULL , The result is Null.
Quary:-
SELECT ename ,salary, (salary+ IIF(IsNull(comm), 0, comm))
FROM emp;
Output:-
In the above example the NVL Function is used to convert all Null Values of comm
Column to zero & Then evalaute the Expresion.
Quary:-
SELECT ename ,salary from emp
where comm=4000
Output:-