Professional Documents
Culture Documents
Mysql-asg 1 ques-Loan (1)
Mysql-asg 1 ques-Loan (1)
Mysql-asg 1 ques-Loan (1)
Simple Select
4. Display the details of all the loans.
5. Display the AccNo, Cust_Name, and Loan_Amount of all the loans.
Using NULL
9. Display the details of all the loans whose rate of interest is NULL.
10. Display the details of all the loans whose rate of interest is not NULL.
Page 1 of 3
16. Display the details of all the loans which started in the year 2009.
17. Display the details of all the loans whose Loan_Amount is in the range 400000 to 500000.
18. Display the details of all the loans whose rate of interest is in the range 11% to 12%.
Using IN Operator
19. Display the Cust_Name and Loan_Amount for all the loans for which the number of instalments
are 24, 36, or 48. (Using IN operator)
20. Write an alternate way of writing the same query as in Q.19 without using IN.
Page 2 of 3
2. Create the table WORKER and add records as shown below. Write SQL commands
for the statements (a) to (g).
EMPNO ENAME JOB HIREDATE SAL COMM DEPTNO
8369 SMITH CLERK 1990-12-18 8000 NULL 20
8499 ANYA SALESMAN 1991-02-20 16000 500 30
8521 MAHADEVAN SALESMAN 1991-02-22 10000 300 30
8566 MOMIN MANAGER 1991-04-02 25000 NULL 10
8654 BINA ANALYST 1992-12-09 30000 NULL 20
8698 SHIAVNSH PRESIDENT 1991-11-18 50000 NULL 10
8882 SCOTT SALESMAN 1991-05-01 12000 1200 30
3. Create a table EMPLOYEE with the following data. Write SQL commands for the
statements (a) to (h).
Table: EMPLOYEE
No Name Salary Area Age Grade Dept
711 KESHAR 40000 WEST 45 C CIVIL
262 KIRTI 35000 SOUTH 38 A ELEC
693 KRIPPLE 60000 NORTH 52 B CIVIL
724 ARYAN 38000 NORTH 29 B CIVIL
705 SAMSON 42000 EAST 35 A COMP
606 BISWAL 29000 SOUTH 34 A MECH
Page 3 of 3