草庐IT

sssurveyparticipantid

全部标签

MySQL INSERT INTO ... SELECT 抛出错误 1064

尝试复制表中的某些行,但只是将ssreportid列从4更改为6:INSERTINTOssreportparticipant(ssreportid,sssurveyparticipantid)VALUESSELECT6,sssurveyparticipantidFROMssreportparticipantWHEREssreportid=4错误在“选择6,...”附近显示#1064,但如果我只运行select子句,它会完美地选择记录,在ssreportid列中使用新ID6。该表有一个名为ssreportparticipantid的主键,并且在(ssreportid,sssurveypa