SELECT INTO does not work

I would like to test the situation, but I need to add a dummy data row to test the hypothesis. So, according to this mySQL manual page for SELECT INTO , my query is correct:

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 

But I get the following msg error:

"You have encountered an error in the SQL syntax, check the manual that matches the version of your MySQL server for the correct syntax to use next to the INTO.sections_rfip courses (SectionID, CourseID, SectionNumber, Term, Credits, 'on line 1"

So, something rotten on INTO, which is not obvious to me, why - help?

+3
source share
1 answer

Try entering INSERT INTO instead: http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-select-into-table.html

EDIT: Oh. I did not understand that it was the same page that you indicated. However, as they say, use INSERT INTO, since SELECT INTO (from Sybase) will not work.

+5
source

All Articles