Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
116 views

Q2. Create A Table Loan - Accounts With in The Database "Loans"

The document contains instructions to create a loan_accounts table within various databases and perform different SQL queries on the table using Python: - Connect to the loan_accounts table using Python - Perform operations like updating records, deleting records, searching records, and displaying records from the table in Python IDE The tables contain sample data with fields like ACCNO, CUST_NAME, LOAN_AMOUNT, etc. The instructions provide different tasks like updating start date, deleting a row, searching by name, updating loan amount, etc to be implemented in Python.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

Q2. Create A Table Loan - Accounts With in The Database "Loans"

The document contains instructions to create a loan_accounts table within various databases and perform different SQL queries on the table using Python: - Connect to the loan_accounts table using Python - Perform operations like updating records, deleting records, searching records, and displaying records from the table in Python IDE The tables contain sample data with fields like ACCNO, CUST_NAME, LOAN_AMOUNT, etc. The instructions provide different tasks like updating start date, deleting a row, searching by name, updating loan amount, etc to be implemented in Python.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Q2. Create a table loan_accounts with in the database “loans”.

Server: - localhost, username:- root , password:-“” , database:-loans


ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table
b) Update the start date to 2021-01-10 whose account no is 4 and
display in the python IDE. [05]

Q2. Create a table loan_accounts within the database “loans”. [05]


Server: - localhost, username:- root , password:-“” , database:-loans
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following table


b) Delete a row in the table having customer name as M.P.YADAV

Q2. Create a table loan_accounts with the database “loan1”. [05]


Server: - localhost, username:- root , password:-“” , database:-loan1
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table
b) Display the records of the table which are not null in the python
IDE.
Q2. Create a table loan_acc within the database “loan2” [05]
Server: - localhost, username:- root , password:-“” , database:-loan2
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table
b) Display the records from table having value as NULL in the python
IDE.
-----------------------------------------------------------------------------------------------------------------------------------------------------------

Q2. Create a table loan_accounts with in the database “loan3”. [05]


Server: - localhost, username:-root , password:-“” , database:-loan3
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table
b) Search and display records for “S.P.Sharma” from the table in the
python IDE.

Q2. Create a table loan_accounts within the database “loan3”. [05]


Server: - localhost, username:- root , password:-“” , database:-loan3
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table
b) Display all the records of customers whose installments are between
30 and 50 from the table in the python IDE .
Q2. Create a table loan_accounts with the database “loan3”. [05]
Server: - localhost, username:- root , password:-“”, database:-loan3
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table
b) Update the loan amount for customer S P sharma to 600000 and
display the records of the table in the python IDE.

Q2. Create a table loan_accounts in the database “loan3”. [05]


Server: - localhost, username:- root , password:-“”, database:-loan3
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following table


b) Update the int_rate for customers by 15% and display the updated
table in the python IDE.
-----------------------------------------------------------------------------------------------------------------------------------------------------------

Q2. Create a table loan_accounts with in the database “loan4”. [05]


Server: - localhost, username:- root , password:-“” , database:-loan4
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table.
b) Delete records for “S.P.Sharma” from the table and display the table
in python IDE.
Q2. Create a table loan_accounts within the database “loan4”. [05]
Server: - localhost, username:-root , password:-“”, database:-loan4
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table
b) Inserts a row in the previous table (5,”M.K. MITTAL”, 6000000, 65,
12.00,”2020-06-06”) and display all the records of the table in the
python IDE.

Q2. Create a table loan_accounts with in the database “loan4”. [05]


Server: - localhost, username:- root , password:- “”, database:-loan4
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table.
b) Find the total no of customers who have installment amount as 36
and display in the python IDE.
Q2. Create a table loan_accounts in the database “loan4”. [05]
Server: - localhost, username:- root , password:-“”, database:-loan4
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following


table.
b) Update the start_date to 2020-09-21 for customer name “K.P. Jain”
and display in the python IDE.
----------------------------------------------------------------------------------------------------------------------------------------------------------
Q2. Create a table loan_accounts with in the database “loan5”.
Server: - localhost, username:- root , password:-“” , database:-loan5
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

c) Write python program to establish connection with the following


table
d) Change the customer name to M K Mittal for account no 4 and
display in the python IDE. [05]

Q2. Create a table loan_accounts within the database “loan5”. [05]


Server: - localhost, username:- root , password:-“” , database:-loan5
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

a) Write python program to establish connection with the following table

b) Add a column End_date and give 2021-04-30 as value for all record
and display data in python idle.

Q2. Create a table loan_accounts with the database “loan5”. [05]


Server: - localhost, username:- root , password:-“” , database:-loan5
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

c) Write python program to establish connection with the following


table
d) Display the records of the table which are null in the python IDE.
Q2. Create a table loan_acc within the database “loan5” [05]
Server: - localhost, username:- root , password:-“” , database:-loan5
ACCNO CUST_NAME LOAN_AMOUNT INSTALLMENTS INT_RATE START_DATE
1 R.K.GUPTA 300000 36 12.00 2009-07-19
2 S.P.SHARMA 500000 48 10.00 2008-03-22
3 K.P.JAIN 300000 36 NULL 2007-03-08
4 M.P.YADAV 800000 60 10.00 2008-12-06

c) Write python program to establish connection with the following


table
d) Change the records from table having value as NULL to 11.00 and
display in the python IDE.

You might also like