Adding FOREIGN KEY to a table in Teradata using ALTER table
Use Alter table command to add referential integrity constraints to a table
ALTER TABLE TABLE_NAME ADD FOREIGN KEY (column_from_this_table) REFERENCES tbl_name_that (column_in_that_table);
ALTER TABLE HAPPY_EMPLOYEES ADD FOREIGN KEY (DeptNo) REFERENCES tbl_dept(department_number);
Read great educational content like this and a lot more !
Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too