Practice Practical 2
Practice Practical 2
2.1.>> ACCOUNT.
2. Change the name patel jigar to patel hiren .
>> update account set name='Patel Hiren' where name='Patel Jigar';
3. Change the name and city where account number is A005.
(new name = kothari nehal and new city = patan ).
>>update account set name='Kothari Nehal',city='Patan' where acc_no='A005';
4. Display only those records where loan taken status is
YES .
2.2>> LOAN.
2. for each loan holders Add 100000 Rs. Amount into the column loan_amt.
6. Modify the structure of table LOAN by adding one column credit_no varchar2 (4
).
>>alter table LOAN add(credit_no varchar2(4));
7. Display the Loan amount*2 of table LOAN.
>> update LOAN set loan_amt=loan_amt*2;
<<INSTALLMENT>>
2. Change the Inst_Date
2-Feb-04 to
3-Mar-04 .
L003 and
L002 .
<<TRANSACTION>>
2. Insert any duplicate value and display all the records without any duplicate
rows.
>> insert into TRANSACTION values ('A003','12-AUG-04','25000','D','cheque');
>> select distinct *from TRANSACTION;
3. Select all the records in descending order(account number wise).
>> select *from TRANSACTION order by ACC_NO desc;
4. Display amt, date, and type of transaction by date wise.
>> select AMOUNT,INST_DATE,TYPE_OF_TR from TRANSACTION order by INST_DATE desc;
5. Create another table TRANSACTION_TEMP from this table.
D .