I have a table category with columns -
category_id , main_id
I would like to check that the main_id value exists in category_id in
any row of the table category.
Is it possible to have a foreign key referring to the current table ?
Or should I be using a trigger to do it ?
I'm thinking I have to use a trigger to do it - but want to make sure.