primary key is foreign key for the same table?
Answer Posted / javed a. khan
Yes this is possible and it will allow.
CREATE TABLE learn_01(book_id NUMBER,
book_name VARCHAR2(100),
book_genre VARCHAR2(100),
isbn_number NUMBER ,
author VARCHAR2(100),
ref_book_id NUMBER)
alter table learn_01 add constraint book_pk primary key (book_id)
alter table learn_01 add constraint foreign key book_rf (ref_book_id) references learn_01
ALTER TABLE learn_01 add CONSTRAINT book_fk1 FOREIGN KEY (book_id) REFERENCES learn_01(book_id);
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the data pump export utility?
How to see free space of each tablespace?
What is a proxy object?
How to convert dates to characters in oracle?
What exactly do quotation marks around the table name do?
What is translate in oracle?
What are the attributes of the cursor?
How to create a new table in oracle?
Explain alias?
What is a database table in oracle?
Assuming that you are an End User How to find that in the payment Batch some of the Invoice was Missing To pay How to find That??
How to put more than 1000 values into an oracle in clause?
How to list all tables in your schema?
How to assign values to variables?
what is port in oracle? how is it related to database application.