How to add Foreign key in a table after the creation of the
table?
Answer Posted / sagar98
ALTER TABLE <table_name>
ADD CONSTRAINT <fk_name> FOREIGN KEY (column_name)
REFERENCES <table_name_where_this_column_acts_as_PK>
(Column_name)
Is This Answer Correct ? | 19 Yes | 0 No |
Post New Answer View All Answers
What is rank () in sql?
List and explain the different types of join clauses supported in ansi-standard sql?
what is a stored procedure? : Sql dba
What is a primary key example?
What is record variable?
How many joins in sql?
Is join same as left join?
How do I truncate a sql log file?
what is the difference between group by and order by in sql? : Sql dba
Does varchar need length?
What is a composite primary key?
what is a trigger in mysql? : Sql dba
How can the performance of a trigger be improved?
what are the 'mysql' command line arguments? : Sql dba
Can we join more than 2 tables in sql?