我想测试一种情况,但我需要添加一个虚拟数据行来测试假设。因此,根据SELECT INTO 的这个 mySQL 手册页,我的查询是正确的:
SELECT INTO courses.sections_rfip
(SectionID, CourseID, SectionNumber, Term, Credits, CutOffDate, StartDate, EndDate, LastDateToWithDraw, ContinuousIntake, AcceptsRegistration, Fee, Instructor, SectionDescription, RegistrationRestrictions, MeetingTime, Notes, Active, Created, SetInactive)
SELECT 3,
s.CourseID,
s.SectionNumber,
s.Term,
s.Credits,
s.CutOffDate,
s.StartDate,
s.EndDate,
s.LastDateToWithDraw,
s.ContinuousIntake,
s.AcceptsRegistration,
s.Fee,
s.Instructor,
s.SectionDescription,
s.RegistrationRestrictions,
s.MeetingTime,
s.Notes,
s.Active,
s.Created,
s.SetInactive
FROM courses.sections_rfip s
WHERE s.sectionid = 1
但我收到以下错误消息:
“您的 SQL 语法有错误;请查看与您的 MySQL 服务器版本相对应的手册,了解在第 1 行的 'INTO courses.sections_rfip (SectionID, CourseID, SectionNumber, Term, Credits, '附近使用正确的语法”
所以在INTO有一些烂东西,这对我来说并不明显,为什么 - 帮助?