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 is the use of file param in imp command?
Why we choose emp number as primarykey?
What are the different approaches used by Optimizer in choosing an execution plan ?
Will you be able to store pictures in the database?
How to increment dates by 1 in oracle?
7. Repeat query (7) but also display all clients who have never ordered anything.
write sql query following source are EmpID, Salary 101 1000 102 2000 103 3000 I want the output format like following empid,sal,composite_sal 101 1000 1000 102 2000 3000 103 3000 6000
What are the built-in functions used for sending Parameters to forms ?
what is exact difference between drop and truncate table.
15. Display the item_cost and then truncate it to the nearest hundred, ten, unit, tenth and hundredth.
Where do you use decode and case statements?
How to convert character types to numeric types?