This set of RDBMS Multiple Choice Questions & Answers (MCQs) focuses on “Sql Queries – II”.
1. Delete the accounts and loans of Downtown branch.
View Answer
(select account_number from account where branch_name=’Downtown’);
delete from account where branch_name=’Downtown’;
delete from borrower where loan_number IN
(select loan_number from loan where branch_name=’Downtown’);
delete from loan where branch_name=’Downtown’;
2. Add a column phoneNo to customer table.
View Answer
3. Change the size of the branch_city to varchar(20).
View Answer
4. Drop the column phoneNo from customer table.
View Answer
5. For all customers who have a loan from the bank, find their names, loan numbers, and loan amount.
View Answer
natural join loan;
6. Find the customer names, loan numbers, and loan amounts, for all loans at the Perryridge branch.
View Answer
natural join loan where loan.branch_name=’Perryridge’;
7. For all customers who have a loan from the bank, find their names and loan numbers with the attribute loan_number replaced by loan_id.
View Answer
natural join loan;
8. Find the names of all branches that have assets greater than atleast one branch located in Brooklyn.
View Answer
(select min(assets) from branch where branch_city = ‘Brooklyn’);
9. Find the names of all customers whose street address includes the substring ‘Main’.
View Answer
like ‘%Main%’;
10. List loan data, ordered by decreasing amounts, then increasing loan numbers.
View Answer
Sanfoundry Global Education & Learning Series – RDBMS.
To practice all areas of RDBMS, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Practice Computer Science MCQs
- Check Computer Science Books
- Check RDBMS Books
- Apply for Computer Science Internship