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...

can foreign key take role of primary key?

Answer Posted / suresh murugadass

Yes. It is possible in this scenario. Here table has a
self join. Since emp_id represents both emp_id and mgr_id
this is possible a primary key to behave as foriegn key
create table emp(
emp_id int not null primarykey,
emp_name varchar2(40) not null,
mgr_id int not null foriegn key(mgr_id) references emp(emp_id)
}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain sql server service broker?

981


What is the difference between mysql and mysqli?

1206


What is store procedure? How do they work?

1023


What is a trace frag?

1088


List all the types of user-defined functions?

1103


what is the difference between them (ethernet networks and token ring networks)? : Sql server database administration

1055


What are the new features in SQL Server 2005 when compared to SQL Server 2000?

1166


Explain the disadvantages/limitation of the cursor?

964


What are entities and relationships?

975


How can I add Reporting Services reports to my application?

129


What is always encrypted?

1003


What is nested transaction?

1104


What are the properties of the transaction?

1006


In which sql server version report builder introduced?

150


What is onf in normalization form?

1060