问大家在SQL中怎样把这段代码转换为表.
要怎么做?
kage smallint,
ktime smalldatetime);
create table room(
rid char(4) not null primary key,
rtype smallint,
rrn smallint);
create table kr(
kid char(4) not null foreign key references kh(kid),
rid char(4) not null foreign key references room(rid),
rd smallint,
rmoney int,
primary key(kid,rid),
);
insert into kh values('0001','周楠','男',20,'2007-05-08 12:35');
insert into kh values('0002','钱勇勇','男',20,'2007-05-08 12:35');
insert into kh values('0003','陆向荣','男',20,'2007-05-08 12:35');
insert into kh values('0004','周明','男',20,'2007-05-08 12:35');
insert into kh values('0005','冯树彪','男',20,'2007-05-08 12:35');
insert into kh values('0006','胥睿','男',20,'2007-05-08 12:35');
insert into room values('0001'1,2);
insert into room values('0002'2,2);
insert into room values('0003'3,2);
insert into room values('0004'4,2);
insert into room values('0005'5,2);
insert into room values('0006'6,2);
insert into kr values('0001','0001',1,null);
insert into kr values('0002','0002',2,null);
insert into kr values('0003','0003',1,null);
insert into kr values('0004','0004',1,null);
insert into kr values('0005','0006',1,null);
insert into kr values('0006','0005',1,null);