Skip to content

Instantly share code, notes, and snippets.

@aitor
Created December 4, 2012 13:50
Show Gist options
  • Save aitor/4204061 to your computer and use it in GitHub Desktop.
Save aitor/4204061 to your computer and use it in GitHub Desktop.
INSERT INTO n64w022_c10 (the_geom, height, id) VALUES(
SELECT the_geom, height, id
FROM n64w021_c10
);
// ERROR: syntax error at or near "INTO"
// LINE 1: SELECT * FROM (INSERT INTO n64w022_c10 (the_geom, height, id... ^
@javisantana
Copy link

INSERT INTO n64w022_c10 (the_geom, height, id) VALUES( SELECT the_geom, height, id FROM n64w021_c10);

@aitor
Copy link
Author

aitor commented Dec 4, 2012

INSERT INTO n64w022_c10 (the_geom, height, id) SELECT the_geom, height, id FROM n64w021_c10;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment