Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

what is "missing keyword" in SQL?

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"

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>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>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading