Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is PL/SQL ?

2220


Explain an exception and its types?

1141


What is enter substitution variable in oracle?

1097


Where do you use decode and case statements?

1045


What is the Tune Query

2347


How to find out what oracle odbc drivers are installed?

1094


Explain a data segment?

1112


Explain joins in oracle?

1094


What is define in oracle?

1112


Is it possible to split the print reviewer into more than one region ?

2343


What are the different types of partitions in oracle?

1034


How to delete a column in an existing table?

1132


If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?

2194


In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col

4235


How do you find out from the RMAN catalog if a particular archive log has been backed-up?

2174