Skip to content
Advertisement

Tag: categories

Restrict “subcategory” based on other “category” column

I’m creating a SQLite database where I have 3 tables: transactions, categories, sub-categories in the transactions table, there is a column “category” with a foreign key to the categories table in the sub-categories table, there is column “parent-category” with a foreign key to the categories table Now, how can I ensure that the sub-category that I fill in with transactions

Advertisement