2009-07-27 7 views
3

상황을 테스트하고 싶습니다만 가설을 테스트하기 위해 더미 행의 데이터를 추가해야합니다.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 

그러나 나는 다음과 같은 오류 MSG를 얻을 : 그래서, this mySQL manual page for SELECT INTO에 따라, 내 쿼리는 올바른

"당신은 당신의 SQL 구문에 오류가있다; MySQL 서버 버전에 해당하는 설명서를 확인을 올바른 구문은 근처의 사용에 대한 'courses.sections_rfip INTO (SectionID, CourseID, SectionNumber, 기간, 학점,'라인 1 "

에서 그래서 나에게 왜 분명하지 않은 INTO에서 썩은 뭔가가있다 - 도움?

답변

5

대신 INSERT INTO를 시도하십시오. http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-select-into-table.html

편집 : 죄송합니다. 그것이 당신이 열거 한 것과 같은 페이지라는 것을 깨닫지 못했습니다. 그러나 SELECT INTO (Sybase)가 작동하지 않으므로 INSERT INTO를 사용하십시오.

+0

쏴, 나는 그것을 완전히 오독했다. –