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

How to add Foreign key in a table after the creation of the
table?

Answer Posted / devi

alter table table2
add(constraint table2_col2_fk foreign key(col2) references
table1(col1);
here col2 is the foreign key of table2 which refer to the
col1 of table1 which is h epimary key of table1

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does a join table need a primary key?

902


What is a database event trigger?

1081


What is a rank in sql?

898


What are the ways on commenting in a pl/sql code?

1051


What is sql partition function?

1117


Which operator is used in query for pattern matching?

1032


Is sql procedural language?

919


what is the difference between primary key and unique key? : Sql dba

969


What is difference between hql and native sql?

1092


Why coalesce is used in sql?

917


Can we insert data into materialized view?

896


what are date and time data types? : Sql dba

930


What is the use of function "module procedure" in pl/sql?

1134


Is microsoft sql free?

1043


what are the disadvantages of mysql? : Sql dba

1075