[SQL] 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 ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [SQL] APPEND INTO?
On 12/1/05, Mark Fenbers <[EMAIL PROTECTED]> 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 ;) ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [SQL] APPEND INTO?
Mark Fenbers <[EMAIL PROTECTED]> 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 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org