Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

ADARSHA COLLEGE,KOLAR

I Mcom:Information System and Computers

SQL :Practical Programs

1.Create a table for a Class of students with the following details:

Idno:Number(4),Sname:Char(20), Sub1:Number(3),Sub2:Number(3),
Sub1:Number(3), Sub1:Number(3), Sub1:Number(3), Sub1:Number(3)

1.Add records into the table Class for 5 students using insert command.
2.Display the description of the table using DESC command.
3.Caluculate TOTAL and PERCMARKS
4.Compute the RESULT as”PASS” or “FAIL” by checking if the student has
scored more than 35 marks in each subject.
5.List the contents of the table.
6.Retrieve only IDNO and SNAME of all students.
7.List the students who have result as “PASS”.
8.List the students who have result as “FAIL”.
9.Count the number of students who have passed.
9.Count the number of students who have failed
10 List the students who have percentage greater than 60
11.Sort the table according to the order of IDNO.

2. Create a table for a EXAMINATION with the following details


Regno:Number(5).Name:char(10),collegecode:varchar(4),physics:number(2),
chemistry:number(2),maths:number(2),Compscience:number(2),
Total:number(3),city:Char(10).
1.To find number of students in College Code C3(or any other) and Total marks is
greater than 300.
2.To find average marks of computer Science of all the students.
3.To find average marks of students in college C3(or any other).
4To display the maximum marks of Physics
5.To display the minimum marks of chemistry
6.To find total computer science marks for all students in college code C1(or any
other).
7.To display the maximum marks of chemistry,maths,cs and total.
3. Create a table for a STUDENT with the following details
Regno:Number(10),Name:char(10),DOB:Date,Combination:char(4),
marks:Number(5),fees:Number(5),City:char(10)
1.To display the name of the students whose register number is 104(or any other)
2.To display regno,name,marks and city from the table
Whose marks more than 400 and not residing in the city ‘bangalore’.
3.To display a list of students with combination PCMC,PCMB,PCME.
4.To list the students who have paid the fees between 10000 to 12000(or any other
values)
5.To display the list of students in the alphabetical order of their city.
6.To display the list of students having PCME combination in the alphabetical
order of their name.
7.To display the list of student s in the descending order of marks.
8.To list all the students who are not PCME combination.

4. Create a table for a EMPLOYEE with the following details


Empcode:number,Empname:char,DOB:Date,Department:Char,Salary:
number(10)
1.Create the above table
2.Enter 5 records into the table
3.Display the number of employees working in each department.
4.Find the sum of salaries of all employees
5.Find the sum and average of salaries of employees of a particular department.
6.Find the highest salary that an employee draws.
7.Find the least salary that an employee draws.
8.Find the total salary for each department.
9.Increase the salary of those employees working for the computer department by
rs.1000.
MICROSOFT EXCEL PROGRAMS

1.Prepare a 5 students marks sheet with following data and print status
distinction,good,poor,based on the percentage
SN Re Studen Sub Sub Sub Sub Sub Sub Total Percentag Ran Pass/Fai Statu
o g t 1 2 3 4 5 6 Mark e k l s
No Name s

Calculate Total,Percentage,Rank,Pass/Fail,Status of five students

2.Prepare a Payroll(Salary Statement) of five students with following data


SNo Employe Basic DA HRA PF Gross EPF LIC Total Net
e name salary salary Deduction Salary

Assume DA 10% basic salary


HRA 7.5% of basic salary
PF is 15% of basic salary
EPP Half of PF
LIC Half of EPF

You might also like