i have some troubles filling a predefined table with a stored procedure.
mytable has 6 fields: uid,testrun,exp1,exp2,exp3,weightedvalue where uid is an autoincrement PK. My sp contains an insert statement like:
CREATE PROCEDURE test (IN testrun INT)
BEGIN
.... some declare statements ...
INSERT INTO exp_factors(testrun,exp1,exp2,exp3,weightedvalue) VALUES
(testrun,
exp1,
exp2_1 + exp2_2,
exp3_1 + exp3_2,
exp1 * 0,2 + (exp2_1+exp2_2) * 0.5 + (exp3_1+exp3_2) * 0.3);
END
Unfortunately this results in the error stated in the title. I understand that I insert only 5 of 6 fields but obviously I do not want to enter the autoincrement PK uid manually.
How can I enter my exp values to this table without passing on the autoincrement id.
Of course I could just create a table without an extra PK, but that′s not what i want.
Thanks for any suggestions in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…