I keep getting that error
ERROR 1241 (21000): Operand should contain 1 column(s).
I have table Deck
which has DeckId, PlayerId, CardId
(player and card are foreign keys from table Collection
). And all three are primary key for that table. I am trying to do simple Insert on Deck.
INSERT INTO Deck (DeckId, PlayerId, CardId)
VALUES (1, 1, 1);
And I keep getting that error. I modeled database with MySql workbench. Deck
is dependent on Collection
, it has identifying 1:m relationship. I don't know if that may be causing problems.
Here is paste for create schema , triggers . Names are not in English. It is model of DB for card game Hearthstone, dunno if I should use that name, but it is for a school project, I guess professor won't mind.
I found what the mistake was.
It was not problem in insert statement but in create trigger statement. It returned 2 rows instead of 1. Thank you all.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.