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

Answer Posted / subbu

You cannot add foreign key after creation of the table until
unless you have assigned the primary key while creating the
table. I mean without a primary key assigned for a table, we
cannot add foreign key.

Once the primary key is found, then query to add is been
already given by the above posters.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sql a microsoft product?

498


How would you reference column values before and after you have inserted and deleted triggers?

622


how many ways to get the current time? : Sql dba

530


How to handle bulk data?

891


Sql technical questions

777






who introduced sql?

572


What is cross join example?

556


How does an execution block start and end in pl sql?

500


What are all ddl commands?

549


What does select count (*) mean in sql?

552


Is progress software supports to ( pl/sql )?

530


how to use like conditions? : Sql dba

575


Is it possible to pass parameters to triggers?

575


What is auto increment feature in sql?

621


What is the starting oracle error number?

569