#1242 - 子查询返回多于1行的插入

时间:2017-10-27 13:11:31

标签: php mysql

为什么此查询返回的行数超过1行。我收到了错误。

INSERT INTO student_subject
  (student_fk, subject_fk, marks, grade, comet)
VALUES (
  (SELECT student.stdtid FROM student WHERE concat(student.firstname, ' ', student.middlename, ' ', student.surname)='lazaro kitambara alfredy'),
  (SELECT subjects.subject_id FROM subjects WHERE subjects.subject_name='sayansi'),
  98,
  'A',
  'pass'
);

0 个答案:

没有答案