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

How many tables can you join in sql?

1009


Why do you partition data?

1066


what happens if null values are involved in expressions? : Sql dba

1093


What is pl/sql language case sensitive?

1182


What is embedded sql with example?

1099


Explain how to use transactions efficiently : transact sql

1018


What is difference between cursor and trigger?

1129


What is out parameter used for eventhough return statement can also be used in pl/sql?

1127


which command using query analyzer will give you the version of sql server and operating system? : Sql dba

1109


Is sql a backend language?

1146


Is full outer join same as cross join?

1018


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

1019


What are the datatypes available in pl/sql ?

1155


how do you know the version of your mysql server? : Sql dba

1048


Can a table contain multiple foreign key’s?

1056