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 |
How do you rate yourself in oracle and sql server ?
Explain the use of ignore option in imp command.
What is the usage of control file in oracle?
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
What is SQL Tuning Advisor in Oracle?
what is host string in sql plus? how does it related to database?
How would you begin to troubleshoot an ORA-3113 error?
HI Friends Myself Manoj,i am from bengaluru.i have 1 yr of exp in PLSQL but not upto the mark..now attending interviews but m not able to clear even 1 round..i have attended 3 interviews till today.purpose of writing this query is,i want to know the intreview topics that interviewer going to ask frequently,mainly SCENARIO based questions.IF anybody have any PLSQL projects please give it to me,it will helps me alot.Thanks for your patience.
waht is referencial integrity?
HOW TO DISPLAY MAXIMUM SALARIES FROM EMP DEPARTMENT VISE ALONG WITH DEPARTMENT NAMES? E.g EMP,DEPT
5 Answers College School Exams Tests, DELL,
10)In an RDBMS, the information content of a table does not depend on the order of the rows and columns. Is this statement Correct? A)Yes B)No C)Depends on the data being stored D)Only for 2-dimensional tables
What is an Index ?