0% found this document useful (0 votes)
9 views

Practical Questions

Uploaded by

bhoihimanshu49
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Practical Questions

Uploaded by

bhoihimanshu49
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ODISHA ADARSHA VIDYALAYA, RENGALI

PRACTICAL BASED QUESTIONS (RDBMS & JAVA)


CLASS XII SCIENCE
SUBJECT- IT(802)
1. Roll_Number Name Age Address
C001 Ronak 13 Sambalpur
C002 Sujit 14 Bhubaneswar
C003 Subham 13 Bargarh
C004 Supriya 14 Sundergarh

Write SQL query to


a) Create a table “Student” with Roll_Number as Primary key
b) Insert records.
c) Retrieve the names and ages of all students from the students table where the
age is greater than 13.
d) Update the address of the students whose address is “Sambalpur”.
e) Display the records of all the students after update.

2. Emp_Id Emp_Name Department Salary


E001 Sumit Sales 25700
E002 Bijay Marketing 34000
E003 Sekhar Sales 29000

Write SQL query to:


a) Create an Employee table with Emp_Id as Primary key.
b) Insert records.
c) Describe the structure of table.
d) Find the average salary of all employees in the 'Sales' department.
e) Display the list of employees whose salary is between 25700 and 35700.
3. Customers
Customer_Id Customer_Name
101 Ranjit
102 Somnath
103 Subhankar

Orders

Order_Id Product Customer_Id


R001 Laptop 103
R002 TV 101
R003 Smart Phone 103

Consider Customer_Id and Order_Id as Primary key of Customers and Orders table
respectively and Customer_Id as Foreign key in Orders table.
Write a SQL query to
a) Create Customers and Orders table.
b) Insert records.
c) List all orders along with the corresponding customer names from the orders
and customers tables.
4. Product_Id Product_Name Price Stock
P001 Smart Phone 27500 35
P002 PC 45000 45
P003 Tablet 29000 23

Write a SQL query to


a) Create Products table with Product_Id as Primary key.
b) Insert records.
c) Display all the records.
d) Insert a new record in the table. The new product has a name "Wireless
Mouse", a price of 1500, and a stock of 30.
e) Display the list of products whose price is available in the following list:
(25000, 27500, 37000, 39000, 29000).
5. Emp_Id Emp_Name Emp_Department Emp_Salary
E001 Chinmaya Electrical 37000
E002 Manas Management 52000
E003 Rohit Computer Science 48000

Write a SQL query to


a) Create Employee table with Emp_Id as Primary key.
b) Insert Records.
c) Display all the records.
d) Update the salary of an employee with the Emp_id of E001 to 60000 in the
Employee table.
e) Display the record(s) of employee(s) whose name starts with C and ends with
a.
6. Write a Java program to print a string as output by taking Input at run time.
7. Write a java program to perform addition, subtraction, multiplication, division by
taking values as input during run time.
8. Write a java program to check whether a number is even or odd by taking input
during execution.
9. Write a java program to check whether a number is even or odd by taking input at
run time.
10. Write a java program to compare two numbers by taking user input at run time.
11. Write a java program to compare list of numbers by taking user input at run time
and display the largest number as output.
12. Write a java program to compare list of numbers by taking user input at run time
and display the Smallest number as output.
13. Write a program in java to find the reverse of a number.
14. Write a program in java to check whether a number is palindrome or not.
15. Write a program in java to check whether a number is prime or not.
16. Write a program to display Fibonacci series of 10 numbers.
17. Write a program in java to check whether a number is Armstrong or not.
18. Write a program in java to find factorial of a number.
19. Write a program in java to display factors of a number.
20. Write a program in java to swap two numbers using a third variable.
21. Write a program in java to swap two numbers without using third variable.
22. Write a program to find square root and cube root of a number.
23. Write a program to find the area and perimeter of a circle by using user-defined
methods.
24. Write a program to print natural numbers from 1 to 300.
25. Write a program to display the list of prime numbers between 2 and 100.
26. Write a program in java to take input from the user for an array and display all the
values of array.
27. Write a program in java to take input from the user for an array and search a value
from array and display it's position.
28. Write a program in java to take input from the user for an array and sort the array
before displaying the output.
29. Write a program in java to take input from the user for an array and display the
largest and smallest elements of array.
30. Write a program in java to enter three angles of a triangle and test it is a valid triangle
or not? If it is a valid triangle, then test it’s an acute angle or obtuse angle or right-
angle triangle.

You might also like