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

Answer Posted / venkatesh

u have create two tables an the time one in first table must an should using primary key .in way of using ddl cmd.
A)alter table table name add fk(clm name) reference column name from table name consists of primary key

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between function and trigger?

719


What is memory optimized?

750


What is Collation Sensitivity ? What are the various type ?

697


Is time a data type in sql?

646


What is union?

815






What is sorting in sql?

673


What does := mean in pl sql?

754


How to create an array in pl/sql?

771


What is indexing in sql and its types?

738


What is the difference between sql and t sql?

715


table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

3715


Can delete statement be rollbacked?

729


What is left inner join in sql?

722


When is a declare statement required?

867


Write a unique difference between a function and a stored procedure.

713