You are on page 1of 4

SOURCE CODE:

Bank Table Creation


sQL> ereate table bank(custid number( |0),name varchar2( 15),openingdate varchar2( 15),actye
varchar2(
10).currbal number( 10), withdrawnumber( 10),deposit number(10),netbalance number( 10):

Table created.

To View Sructure of the Table

SQL> desc bank;


Name Null? Type

CUSTID NUMBER(10)
NAME VARCHAR2(15)
OPENINGDATE VARCHAR2(15)
ACCTYE VARCHAR2(10)
CURRBAL NUMBER(10)
WITHDRA W NUMBER(10)
DEPOSIT NUMBER(10)
NETBALANCE NUMBER(10)

Insert Values to the Table


SQL> insert into bank
values(&custid', &name','&openingdate,'&acctype', &currbal''&withdraw', &de
posit, &netbalance');
Enter value for custid: 12454

Enter value for name: ani


Enter value for openingdate: 2jan20 12
Enter value for acctype: savings
55
Enter value for currbal: 20000
Enter value for withdraw: 2000
Enter value for deposit: 50000
Enter value for netbalance: 68000
old T: insert into bank values('&custid' '&name''&openingdate','&acctype', &currbal', &withdraw,
new T: insert into bank values('12454".'ani'2jan2012''savings/20000',2000,50000",68000')

Irow created.

SÌL> insert into bank


values(&custid' &name','&openingdate, &acctype','&currbal','&withdraw" &de
posit', &netbalance'):
Enter value for custid: 15478
Enter value for name: rohit

Enter value for openingdate: 12feb20 10


Enter value for acctype: savings
Enter value for currbal: 50000
Enter value for withdraw: 5000

Enter value for deposit: 500000


Enter value for netbalance: 545000
&withdraw',
old 1: insert into bank values("&custid",'&name','&openingdate','&acctype','&currbal',
5000",'500000'5450
new I: insert into bank values('1 5478,'rohit',' 12feb2010''savings',"'50000',

Irow created.

SQL> insert into bank


values(&custid,'&name','&openingdate', &acctype','&currbal'," &withdraw','&de
posit, '&netbalance'):
Enter value for custid: 24568
Enter value for name: depa
Enter value for openingdate: 4apr2013
56
Enter value for acctype: current
Enter value for currbal: 300000
Enter value for withdraw: 0
Enter value for deposit: 500000
Enter value for netbalance: 800000

old 1: insert into bank values('&custid''&name''&openingdate''&acctype, &currbal,'&withdraw,


new 1: insert into bank values(24568, depa '4apr2013' current',"300000', 0,500000","800000")

Irow created.

SQL> insert into bank


values('&custid" "&name''&openingdate '&acctype','&currbal!. &withdraw,&de
posit''&netbalance'):
Enter value for custid: 455787
Enter value for name: sindhu

Enter value for openingdate: 160ct2013


Enter value for acctype: current
Enter value for currbal: 500000

Enter value for withdraw: 100000

Enter value for deposit: 600000


Enter value for netbalance: 1000000

old 1: insert into bank values('&custid','&name', &openingdate',&acctype','&currbal', &withdraw',


new 1: insert into bank values('455787'sindhu','16oct2013,'current,"500000", 100000"'600000,

Irow created.

To View Content of the Table


SQL> select*from bank;

CUSTID NAME OPENINGDATE ACCTYE CURRBAL WITHDRA W

57
DEPOST NETBALANCE

20000 2000
12454 ani 2jan2012 savings
S0000 68000

50000 5000
I5478 rohit 12fcb2010 savings
S00000 545000

300000 0
24568 depa 4apr2013 current

S00000 S00000

ACCTYE
CURRBAL WITHDRAW
CUSTID NAME OPENINGDATE

DEPOSIT NETBALANCE

l6oct201.3 current 500000 100000


455787 sindhu

600000 1000000

SQL> commit:

Commit complete.

has botn creutd sucenfully


quen peqrom

58

You might also like