You are on page 1of 39

Practical Lab File

On
Information Technology Management

Submitted By:
Name: Sidharth Gautam
MBA (W), 1st Sem, Sec- A
Enrolment No.: 056-116688516

University School of Management Studies (USMS)


Guru Gobind Singh Indraprastha University
Sector -16C, Dwarka, New Delhi 110006

INDEX
HTML Based
Ques.1) Create an ordered and unordered list of your choice.
Ques.2) Create a HTML file using the following tags:
a) Header Tags

b) Formatting Tags

c) Anchor Tags

Ques.3) Create an Ordered and definition list of your choice.


Ques.4) Create an unordered and definition list of your choice.
Ques.5) Create a hyperlink to transfer the control to another webpage and
back to the original webpage.
Ques.6) Create a hyperlink to transfer the control to some other location on
the same webpage.
Ques.7) Create the following table:
empno
1111
2222

empname
rakesh
suresh

designation
Manager

Ques.8) Create a table as shown below using table tags.


CELL1
CELL2

Cell Spans 2 Column


CELL3

CELL4

Ques.9) Create a form of your resume using HTML.


Ques.10) Create a form to collect feedback from students about the course
contents.

SQL Based
Ques.11) Display average salary of employees having salary greater than 500
from emp table.
Ques.12) Display the department no and total no of employees from emp
table and group them by department number.
Ques.13) Display the total salary from emp table where department no. is
either 10 or 20.
Ques.14) Display dept no and total salary from emp table where job is not
equals to salesman and employee having total salary greater than 6000.
Ques.15) Display dept no and total number of job in emp table and group
them by deptno.
Ques.16) Display second maximum salary from emp table
Ques.17) Create a table newdept.
Ques.18) Alter table empdata and add primary constraint on employee id.
Ques.19) Insert values in empdata table with values where input is from
keyboard.
Ques.20) Create a copy of existing table emp without data.
Ques.21) Append a string _emp on employee name and display all the
employees with append name.
Ques.22) Trim the string from the right and display the trimmed name from
emp table.
Ques.23) Display the name of employees in uppercase from emp table.
Ques.24) Display the name of employees in the lowercase from table.
Ques.25) Display the length of employee name from emp table.

Ques.26) Display the first two letters of employee name from emp table.
Ques.27) Display the employee name from emp table where length of emp
name is greater than 4.
Ques.28) Find the position of first letter A in all the employee names in emp
table.
Ques.29) Find out the second occurrence of A in ename from emp table.
Ques.30) Display the emp name from emp. table where sound of employee
name likes JOHNS.
Ques. 31) List the details of all employees in departments 10 and 20 in
alphabetical order of name.
Ques. 32) List names and jobs of all clerks in department 20 in alphabetical
order of name.
Ques. 33) List the names of all employees who LL and TT in their names.
Ques.34) List names and total remuneration for all employess.
Ques.35) List name, annual salary and commission of all salespeople whose
monthly salary is greater than their commission. The output should be ordered
by salary, highest first if two or more employees have the same salary sort by
employee name within the highest salary order.
Ques.36) List lowest paid employees working for each manager sort the output
by salary.

Ques.37) List all employees, their job, and department number who are having
same job as that of any employee of department number 20.
Ques.38) List all employees, their salary and their increment using emp and
incr table.
Ques.39)Using self join, list all employees having salary greater than or equal
to employee number 7788.

Ques.40) Consider emp table, List all employees who earn less than the
average salary of all the employees.
Ques.41) List all employees name along with their managers name. Also list
the name of that employee who has no manager (Employee KING has no
manager).
Ques.42) Display the department that has no employee.
Ques.43) List the employee details who earn minimum salary of their job.
Ques.44) List the ename, salary, deptno for those employees who earn greater
than average salary for their department, sort the output in department
number order.
Ques.45) List the employees details who earn highest salary of their job.
Ques.46) List the details of those employees who are among the five highest
earners of the company.

HTML Based

Ques.1) Create an ordered and unordered list of your choice.


Ans.1)
<HTML>
<HEAD>
<TITLE> LISTING </TITLE>
</HEAD>
<BODY>
<BODY bgcolor = "pink">
<U> Ordered Listing: </U>
<OL type = "A" start = 1>
<lh> <B> Students: </B>
<li> Harish
<li> Sanjay
<li> Kapil
<li> Rajkumar
</OL>
<BR>
<BR>
<U> Unordered Listing: </U>
<UL type = "circle">

<lh> <B> Students: </B>


<li> Harish
<li> Sanjay
<li> Kapil
<li> Rajkumar
</UL>
<BR>
<BR>
<U> Ordered & Unordered Listing: </U>
<OL type = "1">
<li> Harish
<li> Sanjay
<UL type = "disc">
<li> Dwarka
<li> Gurgaon
<OL type = "I">
<li> A 15/60
<li> B 5/41
</OL>
</UL>
</OL>

</BODY>

</HTML>

Ques.2) Create a HTML file using the following tags:


b) Header Tags

b) Formatting Tags

c) Anchor Tags

Ans.2)
<html>
<head>
<center>

<h1> <B> <FONT color= "red"> Heading Bold </FONT color= "red"> </B> </h1>
<h2> <I> <FONT color= "green"> Heading Italic </FONT color= "green"> </I>
</h2>
<h3> <U> <FONT color= "orange"> Heading Underline </FONT color=
"orange"> </U> </h3>

<h4> <strike> <FONT color= "pink"> Heading Strike </FONT color= "pink">
</strike> </h4>
<h5> <big> <big> <big> <big> <FONT color= "magenta"> Heading Big </FONT
color= "magenta"> </big> </big> </big> </big> </h5>

<A> HREF = "www.dcube.in" </A>


<title>Header Tags with formatting Tags</title>
</head>
</center>

</html>

Ques.3) Create an Ordered and definition list of your choice.


Ans.3)
<HTML>
<HEAD>
<TITLE> LISTING </TITLE>
</HEAD>
<BODY>
<BODY bgcolor = "pink">
<U> Ordered & Definition Listing: </U>
<DL>
<DT> <B> Ques 1: </B> What's your profession?
<DD>
<B> Ans 1: </B>
<OL type = "1">
<li> My profession is Engineering
<li> Engineering is my profession
<li> I have done my Graduation in Enginering
</OL>
<BR>
</DD>
<DT> <B> Ques 2: </B> Where are you living?

<DD>
<B> Ans 2: </B>
<OL type = "A">
<li> I am living in Gurgaon
<li> Near Manesar
<li> Near Main Bus Stand
</OL>
</DD>
</DL>
<BR>
<BR>
</BODY>
</HTML>

Ques.4) Create an unordered and definition list of your choice.


Ans.4)
<HTML>
<HEAD>
<TITLE> LISTING </TITLE>
</HEAD>
<BODY>
<BODY bgcolor = "pink">
<U> Unordered & Definition Listing: </U>
<DL>
<DT> <B> Ques 1: </B> What's your profession?
<DD>
<B> Ans 1: </B>
<UL type = "circle">
<li> My profession is Engineering
<li> Engineering is my profession
<li> I have done my Graduation in Enginering
</UL>
<BR>
</DD>
<DT> <B> Ques 2: </B> Where are you living?
<DD>
<B> Ans 2: </B>

<UL type = "disc">


<li> I am living in Gurgaon
<li> Near Manesar
<li> Near Main Bus Stand
</UL>
</DD>
</DL>
<BR>
<BR>
</BODY>
</HTML>

Ques.5) Create a hyperlink to transfer the control to another webpage and


back to the original webpage.
Ans.5)
<HTML>
<HEAD>
<TITLE> LISTING </TITLE>
</HEAD>
<BODY>
<BODY bgcolor = "grey">

<A HREF = "b.html"> Next Page </A>


<A HREF = "a.html"> Back Page </A>

</BODY>
</HTML>

Ques.6) Create a hyperlink to transfer the control to some other location on


the same webpage.
Ans.6)
<HTML>
<HEAD>
<TITLE> LISTING </TITLE>
</HEAD>
<BODY>
<BODY bgcolor = "pink">
<A HREF = "#w"> Definition & Ordered Listing </A> <BR>
<BR>
<BR>
<A HREF = "#x"> Definition Listing </A> <BR>
<BR>
<BR>
<A HREF = "#y"> Ordered Listing </A> <BR>
<BR>
<BR>
<A HREF = "#z"> Unordered Listing </A> <BR>
<BR>
<BR>
<Pre>

</Pre>
<A name = "w">
<U> Definition & Ordered Listing: </U>
<DL>
<DT> <B> Ques 1: </B> What's your profession?
<DD>
<B> Ans 1: </B>
<OL type = "1">
<li> My profession is Engineering
<li> Engineering is my profession
<li> I have done my Graduation in Engineering
</OL>
</DD>
<DT> <B> Ques 2: </B> Where are you living?
<DD>
<B> Ans 2: </B>
<OL type = "A">
<li> I am living in Gurgaon
<li> Near Manesar
<li> Near Main Bus Stand
</OL>
</DD>

</DL>
</A>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<A name = "x">
<U> Definition Listing: </U>
<DL>
<DT> <B> Ques 1: </B> What's your profession?
<DD>
<B> Ans 1: </B>
<li> My profession is Engineering
<li> Engineering is my profession
<li> I have done my Graduation in Engineering
</DD>
<DT> <B> Ques 2: </B> Where are you living?

<DD>
<B> Ans 2: </B>
<li> I am living in Gurgaon
<li> Near Manesar
<li> Near Main Bus Stand
</DD>
</DL>
</A>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<A name = "y">
<U> Ordered Listing: </U>
<OL type = "A" start = 2>
<lh> <B> Students: </B>
<li> Mohit

<li> Rohit
<li> Ramesh
<li> Mukesh
</OL>
</A>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<A name = "z">
<U> Unordered Listing: </U>
<UL type = "circle">
<lh> <B> Students: </B>
<li> Mohit
<li> Rohit
<li> Ramesh
<li> Mukesh

</UL>
</A>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<U> Ordered & Unordered Listing: </U>
<OL type = "1">
<li> Mohit
<li> Rohit
<UL type = "disc">
<li> Pitampura
<li> Rohini
<OL type = "I">
<li> G 5/92
<li> A 533
</OL>

</UL>
</OL>

</BODY>
</HTML>

Ques.7) Create the following table:


empno
1111
2222

empname
rakesh
suresh

designation
Manager

Ans.7)
<html>
<body>
<table border="30" bordercolor="magenta" align="center" bgcolor="pink"
width="200" height="200">
<tr>
<th>empno </th>
<th>empname </th>
<th> designation </th>
</tr>
<tr>
<td> 1111 </td>
<td> rakesh </td>
<p> <td rowspan=2 > Manager </p> </td>
</tr>
<tr>
<td> 2222 </td>
<td> suresh </td>
</table>
</html>

Ques.8) Create a table as shown below using table tags.


CELL1
CELL2

Cell Spans 2 Column


CELL3

CELL4

Ans.8)
<html>
<body>
<table border="10" bordercolor="red" align="center" bgcolor="pink"
width="250" height="100">

<tr>
<td> CELL1 </td>

<td colspan=2 > Cell Spans 2 Columno </td>


</tr>

<tr>
<td> CELL2 </td>

<td> CELL3 </td>

<td> CELL4 </td>

</tr>
</table>
</html>

Ques.9) Create a form of your resume using HTML.


Ans.9)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="utf-8">
<title>Prateek</title>
</head>

<body>
<form action="#">
<table border="1" style="text-align: center;">
<thead>
<tr><th colspan="4">Resume</th></tr>
</thead>
<tbody>
<tr><td colspan="4" style="border: none;padding-top:
25px;"></td></tr>
<tr><td colspan="4">Basic Details</td></tr>
<tr><td>First Name</td><td><input type="text" value=""><td>Last
Name</td><td><input type="text" value=""></td></tr>
<tr><td>Email Adress</td><td><input type="text"
value=""></td><td>Mobile Number</td><td><input type="text"
value=""></td></tr>

<tr><td>Fathers Name</td><td><input type="text"


value=""></td><td>Mothers Name</td><td><input type="text"
value=""></td></tr>
<tr><td>Adress</td><td colspan="3"><input style="width: 98%;"
type="text" value=""></td></tr>

<tr><td colspan="4" style="border: none;padding-top: 15px;"></td></tr>


<tr><td colspan="4">Educational Details</td></tr>

<tr><td>Post
Graduation</td><td>Graduation</td><td>12th</td><td>10th</td></tr>
<tr>
<td><input type="text" value="" placeholder="University/Board"></td>
<td><input type="text" value="" placeholder="University/Board"></td>
<td><input type="text" value="" placeholder="University/Board"></td>
<td><input type="text" value="" placeholder="University/Board"></td>
</tr>
<tr>
<td><input type="text" value="" placeholder="Year Of Passing"></td>
<td><input type="text" value="" placeholder="Year Of Passing"></td>
<td><input type="text" value="" placeholder="Year Of Passing"></td>
<td><input type="text" value="" placeholder="Year Of Passing"></td>
</tr>
<tr>
<td><input type="text" value="" placeholder="Percentage"></td>

<td><input type="text" value="" placeholder="Percentage"></td>


<td><input type="text" value="" placeholder="Percentage"></td>
<td><input type="text" value="" placeholder="Percentage"></td>
</tr>
<tr>
<td><input type="text" value="" placeholder="Stream"></td>
<td><input type="text" value="" placeholder="Stream"></td>
<td><input type="text" value="" placeholder="Stream"></td>
<td><input type="text" value="" placeholder="Stream"></td>
</tr>

<tr><td colspan="4" style="border: none;padding-top: 15px;"></td></tr>


<tr><td colspan="4">Experience Details</td></tr>
<tr><td colspan="4" style="border: none;padding-top: 10px;"></td></tr>
<tr><td rowspan="2">Technology's Worked on:</td><td><input type="text"
value=""></td><td><input type="text" value=""></td><td><input type="text"
value=""></td></tr>
<tr><td><input type="text" value=""></td><td><input type="text"
value=""></td><td><input type="text" value=""></td></tr>
<tr><td colspan="4" style="border: none;padding-top:
10px;"></td></tr>
<tr><td rowspan="2">Projects's Worked on:</td><td><input type="text"
value=""></td><td><input type="text" value=""></td><td><input type="text"
value=""></td></tr>
<tr><td><input type="text" value=""></td><td><input type="text"
value=""></td><td><input type="text" value=""></td></tr>

</tbody>
</table>

<input type="submit" value="Submit" style="margin-top: 10px;margin-left:


285px;">

</form>
</body>
</html>

Ques.10) Create a form to collect feedback from students about the course
contents.
Ans.10)
<html>
<head>

<h1> <U> Feedback Form: </U> </h1>

<title> Feedback Form </title>


</head>
<body>
<form >
First Name: <input type="text" name="first_name" />
<br>
<br>
Last Name: <input type="text" name="last_name" />
<br>
<br>
Class:

<input type="text" name="class" />

<br>
<br>
Section:
<br>
<br>

<input type="text" name="section" />

Roll No.: <input type="text" name="roll_no." />


<br>
<br>
Select Subject for which you want to give feedback about course contents:
<br>
<input type="checkbox" name="maths" value="on"> Maths
<input type="checkbox" name="physics" value="on"> Physics
<input type="checkbox" name="science" value="on"> Science
<input type="checkbox" name="social science" value="on"> Social Science
<input type="checkbox" name="biology" value="on"> Biology
<input type="checkbox" name="english" value="on"> English
<br>
<br>
Description : <br />
<br>
<textarea rows="5" cols="50" name="description">
Enter description here...
</textarea>
<br>
<br>
<br>
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />

<input type="button" name="ok" value="OK" />


<br>

</form>
</body>
</html>

SQL Based

Ques.11) Display average salary of employees having salary greater than 500
from emp table.
Ans.11) select job,avg(sal) from emp group by job having avg(sal) > 500;
Ques.12) Display the department no and total no of employees from emp
table and group them by department number.
Ans.12) select deptno, count(empno) from emp group by deptno;
Ques.13) Display the total salary from emp table where department no. is
either 10 or 20.
Ans.13) select sum(sal) from emp where deptno IN(10,20);
Ques.14) Display dept no and total salary from emp table where job is not
equals to salesman and employee having total salary greater than 6000.
Ans.14) select deptno, sum(sal) from emp where job NOT IN (salesman) group
by deptno having sum(sal) > 6000;
Ques.15) Display dept no and total number of job in emp table and group
them by deptno.
Ans.15) select deptno, count(job) from emp group by deptno;
Ques.16) Display second maximum salary from emp table
Ans.16) select max(sal) from emp where sal NOT IN(select max(sal) from emp);

Ques.17) Create a table newdept.


Ans.17) create table newdept
(deptno number(10),
deptname varchar2(20),
deptloc varchar2(20));
Ques.18) Alter table empdata and add primary constraint on employee id.
Ans.18) alter table empdata add constraint primary key (empno);
Ques.19) Insert values in empdata table with values where input is from
keyboard.
Ans.19) insert into empdata values (&empno, &ename, &sal);
Ques.20) Create a copy of existing table emp without data.
Ans.20) create table ABC as (select * from emp);
Ques.21) Append a string _emp on employee name and display all the
employees with append name.
Ans.21) select concat(ename, _emp) from emp;
Ques.22) Trim the string from the right and display the trimmed name from
emp table.
Ans.22) select rtrim(concat(ename,_emp), _emp) from emp;
Ques.23) Display the name of employees in uppercase from emp table.
Ans.23) select ename, upper(ename) from emp;

Ques.24) Display the name of employees in the lowercase from table.


Ans.24) select ename, lower(ename) from emp;
Ques.25) Display the length of employee name from emp table.
Ans.25) select ename, length(ename) from emp;
Ques.26) Display the first two letters of employee name from emp table.
Ans.26) select ename, substr(ename,1,2) from emp;
Ques.27) Display the employee name from emp table where length of emp
name is greater than 4.
Ans.27) select ename from emp where length(ename) > 4;
Ques.28) Find the position of first letter A in all the employee names in emp
table.
Ans.28) select ename, instr(ename,A,1,1) from emp;
Ques.29) Find out the second occurrence of A in ename from emp table.
Ans.29) select ename, instr(ename,A,2,1) from emp;
Ques.30) Display the emp name from emp. table where sound of employee
name likes JOHNS.
Ans.30) select ename from emp where soundex(ename) = soundex(Johns);

Ques. 31) List the details of all employees in departments 10 and 20 in


alphabetical order of name.
Ans.31) SELECT * from emp where DEPTNO IN (10,20) order by ename ASC ;
Ques. 32) List names and jobs of all clerks in department 20 in alphabetical
order of name.
Ans.32) Select ename, job from emp where DEPTNO IN (20) order by ename
ASC WHERE job in (Clerk);
Ques. 33) List the names of all employees who LL and TT in their names.
Ans.33) list the names of all employees who have LL and TT in their names
select ename from emp where (ename like '%LL%' or ename like '%TT%');
Ques.34) List names and total remuneration for all employess.
Ans.34) Select ename, sum(sal) from emp group by deptno;
Ques.35) List name, annual salary and commission of all salespeople whose
monthly salary is greater than their commission. The output should be ordered
by salary, highest first if two or more employees have the same salary sort by
employee name within the highest salary order.
Ans.35) Select ename, 12*(sal+nvl(comm,0)) annualsal from emp order by sal
desc;
Ques.36) List lowest paid employees working for each manager sort the output
by salary.
Ans.36) Select ename from emp where job=MANAGER' order by sal;
Ques.37) List all employees, their job, and department number who are having
same job as that of any employee of department number 20.
Ans.37) Select empno, ename, emp.deptno, job from emp, dept where job
in(select job from emp where emp.deptno=20;

Ques.38) List all employees, their salary and their increment using emp and
incr table.
Ans.38) Select empno, ename, sal from emp where empno in(select empno,
incr from incr);
Ques.39)Using self join, list all employees having salary greater than or equal
to employee number 7788.
Ans.39) SELECT e.ename, e.empno, e.sal, m.ename, m.sal as mgr, e.mgr from
emp e, emp m WHERE e.mgr = m.empno and e.salary >m.salary;
Ques.40) Consider emp table, List all employees who earn less than the
average salary of all the employees.
Ans.40) Select empno, ename, sal, deptno from emp e where sal<(select
avg(sal) from emp);
Ques.41) List all employees name along with their managers name. Also list
the name of that employee who has no manager (Employee KING has no
manager).
Ans.41) Select distinct e.ename, m.mgr, m.Ename from emp e inner join emp
m on e.mgr = m.EmpID;
Ques.42) Display the department that has no employee.
Ans.42) Select d.dname from dept d where not exists (select * from emp e
where d.deptno = e.deptno);
Ques.43) List the employee details who earn minimum salary of their job.
Ans.43) Select ename from emp where sal=(select min(sal) from emp);
Ques.44) List the ename, salary, deptno for those employees who earn greater
than average salary for their department, sort the output in department
number order.
Ans.44) Select ename, sal, deptno from emp where sal>(select avg(sal) from
dept order by deptno);

Ques.45) List the employees details who earn highest salary of their job.
Ans.45) select empno, ename, job from emp where sal=(select max(sal) from
emp);
Ques.46) List the details of those employees who are among the five highest
earners of the company.
Ans.46) select * from emp where sal in (select top 5 sal from emp order by
salary desc) ;

You might also like