📄 createtable.sql
字号:
drop table Account_Holder_Transaction;
drop table Account_Hodler;
drop table Registration;
create table Registration
(
cRegistration_id int not null primary key,
cFirst_name char(50) not null,
cLast_name char(50) not null,
cAddress char(50) not null,
cAccount_type char(30) not null,
mAnnual_income decimal null,
cPhone_no char(10) not null
);
create table Account_Holder
(
cAccount_id char(10) not null primary key,
cRegistration_id int not null references Registration(cRegistration_id),
mBalance decimal not null
);
create table Account_Holder_Transaction
(
cAccount_id char(10) not null references Account_Holder(cAccount_id),
dDate_of_transaction char(10) not null,
vcParticulars varchar(50) not null,
cCheck_no char(10) null,
mAmount decimal not null
);
insert into Registration values(100,'Diana','Helbert','Bay Road,Singapore','Savings',340000,'02163467');
insert into Registration values(101,'Hopkins','Jim','Stockholm Street','Current',600000,'032234');
insert into Registration values(102,'Diana','Hayden','Hays Street','Savings',240000,'045678');
insert into Registration values(103,'Bob','Meakins','SunLey House','Fixed Deposit',40000,'02145');
insert into Registration values(104,'Laurry','Helbert','Rock Street','Fixed Deposit',560000,'0416348');
insert into Registration values(105,'Shane','Cornway','Mackin Road','Savings',200000,'041656');
insert into Account_Holder values('AH0001',100,500000);
insert into Account_Holder values('AH0002',101,100000);
insert into Account_Holder values('AH0003',102,100000);
insert into Account_Holder values('AH0004',103,150000);
insert into Account_Holder values('AH0005',104,145000);
insert into Account_Holder_Transaction values('AH001','07/24/01','Check deposit','234123',2250);
insert into Account_Holder_Transaction values('AH002','07/24/01','Check deposit','234123',2250);
insert into Account_Holder_Transaction values('AH003','07/24/01','Check deposit','234123',2250);
insert into Account_Holder_Transaction values('AH004','07/24/01','Check deposit','234123',2250);
insert into Account_Holder_Transaction values('AH005','07/24/01','Check deposit','234123',2250);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -