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

what are the system privileges that are required by a schema owner (user) to create a trigger on a table?

811


Why do you partition data?

723


What is sql profiler in oracle?

759


What are the events on which a database trigger can be based?

816


How to get each name only once from an employee table?

807






what are tables and fields? : Sql dba

766


How to use distinct and count in sql query? Explain

765


Is null operator in sql?

792


How do you declare a user-defined exception?

718


What are operators available in sql?

781


What is embedded sql what are its advantages?

689


Are stored procedures faster than queries?

695


How to create your own reports in sql developer?

729


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

764


How to display the current date in sql?

773