Answer the question
In order to leave comments, you need to log in
How in MySQL, when using INSERT, insert a value into one of the fields: either 1 or -1 ?
Actually the title is the whole question, is it possible to do this?
Answer the question
In order to leave comments, you need to log in
IF (expr1,expr2,expr3)
INSERT INTO `table` (a) VALUES (IF( ...условие... , 1, -1));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question