I wanted to add a foreign key to the item_type_name, but it keeps saying its not correctly formed. here is the code that i was using to add the foreign key.
alter table item_type add constraint
FOREIGN KEY (item_type_name)
REFERENCES item_type (item_type_name)
ON DELETE CASCADE ON UPDATE CASCADE;
This is the table that I was trying to add the foreign key to
This is the table that the key would connect to
In other words the item_type_name from (1) would connect to item_type_name from (2). I am using mariadb.