Writing code should include using the alteration of a previously created table and using syntax such as the following:
ALTER TABLE employees
ADD CONSTRAINT emp_manager_fk
FOREIGN KEY(manager_id)
REFERENCES employees(employee_id);
The ALTER TABLE command is a DDL command, which means that it is automatically committed to the database when issued. Guidelines for altering the structure of a table is as follows: