Xii Sample Practical File 2024
Xii Sample Practical File 2024
Submitted By : ________________________
Class & Section : _____________
Stream : _____________
Roll No : _____________
_______________________
Name of Student
CERTIFICATE
Teacher’s Signature
S. NO TOPICS Page Nos.
2
S. NO MYSQL QUERIES DATE SIGN
SOLUTION
OUTPUT:
QUERY - 2
SOLUTION
OUTPUT:
QUERY - 3
SOLUTION
USE customers;
OUTPUT:
QUERY - 4
SOLUTION
SOLUTION
OUTPUT:
SOLUTION
Output:
Empid Name Department Salary Gender
2 Suman Accounting 35000 F
4 Sakshi Accounting 35000 F
QUERY - 7
SOLUTION
DESCRIBE Employees;
Output:
SOLUTION
SOLUTION
SOLUTION
Output:
left(Name,4) right(Department,3)
Aman les
Suma ing
Ravi les
Saks ing
QUERY - 11
SOLUTION
Output:
sum(Salary) Department
85000 Sales
70000 Accounting
QUERY - 12
SOLUTION
SELECT *
FROM officers
WHERE address = 'Lucknow'
ORDER BY officer_name DESC;
OUTPUT:
QUERY - 13
Write SQL query to retrieve data from multiple tables. It by fetch
records from two or more tables using MySQL INNER JOIN command.
Considering two tables "officers" and "students", having the following
data.
SOLUTION
OUTPUT:
QUERY - 14
SOLUTION
Output:
sum(Salary)
155000
QUERY - 15
SOLUTION
Output:
avg(Salary)
38750.00
QUERY - 16
SOLUTION
max(Salary) min(Salary)
45000 35000
QUERY - 17
SOLUTION
SOLUTION
OUTPUT:
SELECT command gives the following output that shows none of the
records present in the table:
S. NO JAVA PROGRAMS DATE SIGN
9.
10.
11.
S. NO JAVA PROGRAMS DATE SIGN
12.
13.
14.
15.
16.
17.
18.
JAVA Program No.- 1
Write a JAVA program to check whether the number is palindrome
or not.
Source Code :
class PalindromeNum{
public static void main(String args[]){
int r,sum=0,temp;
int n=454;//It is the number variable to be checked for palindrome
temp=n;
while(n>0){
r=n%10; //getting remainder
sum=(sum*10)+r;
n=n/10;
}
if(temp==sum)
System.out.println("palindrome number ");
else
System.out.println("not palindrome");
}
}
OUTPUT :
palindrome number
JAVA Program No.- 2