Practical 1 DBMS Uvpce
Practical 1 DBMS Uvpce
PRACTICAL 1
AIM : Study of Basics of DBMS, SQL. Perform SQL queries for DDL &
DML Commands.
1. Display all rows and all columns of table Installment.
Ans : select * from INSTALLMENT;
6. Change
hange the name ‘Patel Jigar’ to ‘Patel Hiren’ in Account Table.
Ans : update account set name = ‘Patel Hiren’ where name = ‘Patel Jigar’;
9. Add the new column (address varchar2 (20)) into table ACCOUNT.
Ans : alert table account ADD address varchar2(20);
10. Modify the structure of table LOAN by adding one column credit_no varchar2
(4) (Loan table).
Ans : alert table loan ADD credit_no varchar2(4);
11. Create another table ACCOUNT_TEMP having columns (acc_no, name, balance)
from table ACCOUNT.
Ans : create table account_temp as select acc_no,name,balance from
account;
12. Create another table LOAN_TEMP (loan_no, Acc_no, loan_amt, loan_date) from
the table LOAN.
Ans : create table loan_temp as select loan_no,acc_no,loan_amt,loan_date
from loan;
16. For each loan holders Increase the interest rate by 2% (Loan table).
Ans : update loan set interest_rate = (interest_rate+2);
17. Display only those records where loan holder taken a loan in month of
January(Loan table).
Ans : select * from loan where to_char(loan_date,’Month’) = ‘January’;
20. Change the loan_amt 100000 to 150000 where loan number is L001 (Loan
table).