primary key is foreign key for the same table?
Answers were Sorted based on User's Feedback
Answer / 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 |
can anyody please send me the dump for Oracle 10g certifications for DBA path?
How to pass a parameter to a cursor in oracle?
Please explain compound trigger in oracle?
How to end the current transaction in oracle?
Explain user account with reference to oracle.
How to retrieve the count of updated rows?
Table1- have two column filename data AFGDFD-20112011 hi how r u bsdasd-23042011 name shoud be in bold Now i want output like filename data AFGDFD hi how r u bsdasd name shoud be in bold Kindly answer this
How to use subqueries in the from clause in oracle?
what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?
How does oracle handle read consistency?
I have a table called 'test' on source and target with same name, structure and data type but in a different column order. How can you setup replication for this table?
What is meant by a deadlock situation?