Thread: APPEND INTO?
I want to SELECT INTO mytable WHERE (criteria are met), except that I want to APPEND into an existing table the rows that are selected, instead of creating a new table (which SELECT INTO will do). How can this be done? (Is this what the "FOR UPDATE OF tablename" clause is for?) Mark
On 12/1/05, Mark Fenbers <Mark.Fenbers@noaa.gov> wrote: > I want to SELECT INTO mytable WHERE (criteria are met), except that I > want to APPEND into an existing table the rows that are selected, > instead of creating a new table (which SELECT INTO will do). How can > this be done? > > (Is this what the "FOR UPDATE OF tablename" clause is for?) > > Mark > INSERT INTO table SELECT .... -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;)
Mark Fenbers <Mark.Fenbers@noaa.gov> writes: > I want to SELECT INTO mytable WHERE (criteria are met), except that I > want to APPEND into an existing table the rows that are selected, > instead of creating a new table (which SELECT INTO will do). How can > this be done? INSERT INTO foo SELECT whatever regards, tom lane