English

How will you add a foreign key to a relation? -

Advertisements
Advertisements

Question

How will you add a foreign key to a relation?

Options

  • Alter table table_name add foreign key(column_name) References reference_table(column_name);

  • Alter table table_name add foreign_key( column_name) References reference_table( column_name);

  • Alter table table name add foreign key( column_name) References reference_table;

  • Any of the above methods can be used

MCQ

Solution

Alter table table_name add foreign key(column_name) References reference_table(column_name);

shaalaa.com
SQL for Data Definition
  Is there an error in this question or solution?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×