2009-07-27 109 views
3

我想測試一種情況,但我需要添加一行虛擬數據來測試假設。因此,根據this mySQL manual page for SELECT INTO,我的查詢是正確的:SELECT INTO not working

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服務器版本的手冊爲正確的語法使用近「變成courses.sections_rfip (SectionID,CourseID,SectionNumber,期限,信用,」第1" 行

所以有什麼東西爛在INTO,這不明擺着我爲什麼 - 幫助?

回答