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 |
What are inner join and outer join?
what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?
Preparing for Oracle PL/SQL Interviews – Need Help with Common Questions
What is a server parameter file in oracle?
SELECT * FROM (SELECT TITLE FROM MOVIE ORDER BY RANK DESC) WHERE ROWNUM > 4; when i run the above query .it produces output as NO ROWS SELECTED.why ?plz any one help me
Explain about integrity constraint?
I have my backup RMAN script called backup_rman.sh. I am on the target database. My catalog username/password is rman/rman. My catalog db is called rman. How would you run this shell script from the O/S such that it would run as a background process?
what is difference between cartesian join & cross join even they give same result?
how can find the second max sal for every group(i.e i want group the data based on key and find the second max sal for every group
What's dateware house and what's clustor with practicle example
which statement is running fastly ie insert or delete?
How to declare a local variable?