funeralcrasher: (Default)
Is there a way to INSERT SELECT into a table with an auto-increment field?

INSERT INTO t_peep
 SELECT population, name FROM cia
  WHERE region='Europe';

Where I'd normally have to do something like

INSERT INTO t_peep (id, population, name) VALUES (blah_sequence.nextval, '$population', '$name');

Profile

funeralcrasher: (Default)
funeralcrasher

June 2020

S M T W T F S
 123456
78910111213
141516 1718 1920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 25th, 2025 10:18 pm
Powered by Dreamwidth Studios