Reputation: 8640
i spent last few hours trying to find what is wrong in my code(?)
CREATE TABLE transaction (
id NUMERIC PRIMARY KEY,
user_id NUMERIC NOT NULL,
account_id NUMERIC NOT NULL,
category_id NUMERIC NOT NULL,
amount DOUBLE NOT NULL, date VARCHAR(25) NOT NULL,
description VARCHAR(25),
FOREIGN KEY(account_id) REFERENCES account(id),
FOREIGN KEY(user_id) REFERENCES user(id),
FOREIGN KEY(category_id) REFERENCES category(id)
);
to find what is wrong i was adding one column after another, and i noticed i cant create table with more than two foreign keys, is it limit or am i doing something wrong? can i walk this around somehow? im not interested in this case, because i realized i need to change design of my db anyway
regards
Upvotes: 2
Views: 2312