I’ve been searched that statement. but I don’t solcved my problem. so I ask you something. please somebody help me
below statement is my query, and error statement
create table rp_board(
rpbno number primary key, -- pk
m_id varchar2(100) not null, -- fk
rp_list varchar2(100) not null,
rp_title varchar2(100) not null,
rp_content varchar2(2000) not null,
rp_time date default sysdate,
rp_update date default sysdate,
constraint fk_rp_board foreign key(m_id) reference member(m_id)
);
ORA-00905: missing keyword
00905. 00000 – "missing keyword"
>Solution :
It is not a (key)word that’s missing, but a letter. It is references, not reference.
SQL> CREATE TABLE rp_board
2 (
3 rpbno NUMBER PRIMARY KEY, -- pk
4 m_id VARCHAR2 (100) NOT NULL, -- fk
5 rp_list VARCHAR2 (100) NOT NULL,
6 rp_title VARCHAR2 (100) NOT NULL,
7 rp_content VARCHAR2 (2000) NOT NULL,
8 rp_time DATE DEFAULT SYSDATE,
9 rp_update DATE DEFAULT SYSDATE,
10 CONSTRAINT fk_rp_board FOREIGN KEY (m_id) REFERENCES MEMBER (m_id)
11 );
Table created.
SQL>