主题:[原创]菜鸟教你建表.....ORACLE教程..
create table gamedt
(G_NO number(2),
G_NAME VARCHAR2(20),
G_CHARACTER VARCHAR2(20),
G_LEVEL NUMBER(3),
G_SERVER VARCHAR2(20),
P_NAME VARCHAR(20),
constraint gamedt_G_NO_pk primary key(G_NO) references price(G_NO),
constraint gamedt_P_NAME_fk foreign key(P_NAME)references player(P_NAME))
/
这个主表是GAMEDT
下面还有2个...
create table pricedt
(G_NO number(2),
G_NAME VARCHAR2(20),
G_LEVEL NUMBER(20),
G_CHARACTER VARCHAR2(20),
G_PLAYER VARCHAR2(20),
PRICE NUMBER(20),
constraint pricedt_G_NO_pk primary key(G_NO) references price(G_NO))
/
CREATE TABLE PLAYERDT
(G_NO NUMBER(20),
G_NAME VARCHAR2(20),
P_NAME VARCHAR2(20),
P_TEL NUMBER(10),
P_AMOUNTS NUMBER(10),
constraint PLAYDT_P_NAME_fk foreign key(P_NAME)references player(P_NAME))
/
不知道有什么问题没有......有问题大家多多指教啊
(G_NO number(2),
G_NAME VARCHAR2(20),
G_CHARACTER VARCHAR2(20),
G_LEVEL NUMBER(3),
G_SERVER VARCHAR2(20),
P_NAME VARCHAR(20),
constraint gamedt_G_NO_pk primary key(G_NO) references price(G_NO),
constraint gamedt_P_NAME_fk foreign key(P_NAME)references player(P_NAME))
/
这个主表是GAMEDT
下面还有2个...
create table pricedt
(G_NO number(2),
G_NAME VARCHAR2(20),
G_LEVEL NUMBER(20),
G_CHARACTER VARCHAR2(20),
G_PLAYER VARCHAR2(20),
PRICE NUMBER(20),
constraint pricedt_G_NO_pk primary key(G_NO) references price(G_NO))
/
CREATE TABLE PLAYERDT
(G_NO NUMBER(20),
G_NAME VARCHAR2(20),
P_NAME VARCHAR2(20),
P_TEL NUMBER(10),
P_AMOUNTS NUMBER(10),
constraint PLAYDT_P_NAME_fk foreign key(P_NAME)references player(P_NAME))
/
不知道有什么问题没有......有问题大家多多指教啊