相关疑难解决方法(0)

SELECT INTO不起作用

我想测试一下情况,但我需要添加一行虚拟数据来测试这个假设.所以,根据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
Run Code Online (Sandbox Code Playgroud)

但我得到以下错误消息:

"您的SQL语法有错误;请查看与您的MySQL服务器版本对应的手册,以便在'INTO courses.sections_rfip(SectionID,CourseID,SectionNumber,Term,Credits,'第1行)附近使用正确的语法"

所以在INTO中有些东西烂了,这对我来说并不明显 - 为什么?

mysql sql mysql-error-1064

3
推荐指数
1
解决办法
2377
查看次数

标签 统计

mysql ×1

mysql-error-1064 ×1

sql ×1