Write SQL commands for following client and bank tables. Note: Attach query and screenshot of output. Account_no Client name Gender address 101 Tahir M Karachi 102 Umar M Isb 103 Javeria F karachi 104 Asma F lahore 105 Sohail M multan Branch_ID Bank_Name Loan Loan status Account_no 201 HBL 80000 open 101 202 UBL 90000 pending 102 203 JS 77000 accepted 103 204 Metro 68000 Accepted 101 205 Al Habib 75000 close null Write a query to create client table schema in such a way that if we delete row from parent, its corresponding matching row must be deleted in child table. Write sql query to list all clients who have applied for loan. Write sql query to display details of those clients whose loan status is ‘accepted’. Create a view of client to display client name, address, and bank and loan status. Create a view of client to display loan amount of those clients who belong to Karachi. Create a view so that client can see only HBL bank account details. Create a view to display max amount of loan gender wise.
Write SQL commands for following client and bank tables. Note: Attach query and screenshot of output. Account_no Client name Gender address 101 Tahir M Karachi 102 Umar M Isb 103 Javeria F karachi 104 Asma F lahore 105 Sohail M multan Branch_ID Bank_Name Loan Loan status Account_no 201 HBL 80000 open 101 202 UBL 90000 pending 102 203 JS 77000 accepted 103 204 Metro 68000 Accepted 101 205 Al Habib 75000 close null Write a query to create client table schema in such a way that if we delete row from parent, its corresponding matching row must be deleted in child table. Write sql query to list all clients who have applied for loan. Write sql query to display details of those clients whose loan status is ‘accepted’. Create a view of client to display client name, address, and bank and loan status. Create a view of client to display loan amount of those clients who belong to Karachi. Create a view so that client can see only HBL bank account details. Create a view to display max amount of loan gender wise.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Write SQL commands for following client and bank tables.
Note: Attach query and screenshot of output.
Account_no |
Client name |
Gender |
address |
|
||||
101 |
Tahir |
M |
Karachi |
|
||||
102 |
Umar |
M |
Isb |
|
||||
103 |
Javeria |
F |
karachi |
|
||||
104 |
Asma |
F |
lahore |
|
||||
105 |
Sohail |
M |
multan |
|
||||
Branch_ID |
Bank_Name |
Loan |
Loan status |
Account_no |
||||
201 |
HBL |
80000 |
open |
101 |
||||
202 |
UBL |
90000 |
pending |
102 |
||||
203 |
JS |
77000 |
accepted |
103 |
||||
204 |
Metro |
68000 |
Accepted |
101 |
||||
205 |
Al Habib |
75000 |
close |
null |
||||
- Write a query to create client table schema in such a way that if we delete row from parent, its corresponding matching row must be deleted in child table.
- Write sql query to list all clients who have applied for loan.
- Write sql query to display details of those clients whose loan status is ‘accepted’.
- Create a view of client to display client name, address, and bank and loan status.
- Create a view of client to display loan amount of those clients who belong to Karachi.
- Create a view so that client can see only HBL bank account details.
- Create a view to display max amount of loan gender wise.
- Write a query to give SELECT and DELETE rights on column loan status to Tahir.
- Write a query to give all rights on column loan status and loan to Tahir and Javeria and take back rights.
- Write a query to display all the data from both tables.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY