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


Please Help Members By Posting Answers For Below Questions

What does bitemporal mean?

589


What are reports usually used for?

559


What is cte sql?

512


What is java sql connection?

508


how can I make a script that can be bi-language (supports english, german)? : Sql dba

532






Write the command to remove all players named sachin from the players table.

728


Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?

529


What is multiple columns?

567


How to change sql*plus system settings?

535


What are instead of triggers?

615


what is a primary key? : Sql dba

549


How do I run a sql trace?

516


what is the difference between undefined value and null value? : Sql dba

552


How run sql*plus commands that are stored in a local file?

511


Is nosql relational?

544