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

what is bcp? When does it used? : Sql dba

986


Why do we need databases?

1036


What is delimiter sql?

980


What is program debugging?

1238


How long will it take to learn pl sql?

932


What is a pl/sql block?

1218


What is view explain with example?

926


What has stored procedures in sql and how we can use it?

1077


How do I audit the sql sent to the server?

1001


How to test for null values?

1042


What is null in pl/sql?

1062


how do you know if your mysql server is alive? : Sql dba

1076


What is constant in pl sql?

1012


what is the syntax used for partition in tsql? : Transact sql

1013


Can we call dml statement in function?

1049