Skip to content
Advertisement

INSERT with SELECT

I have a query that inserts using a SELECT statement:

Is it possible to only select “name, location” for the insert, and set gid to something else in the query?

Advertisement

Answer

Yes, absolutely, but check your syntax.

You can put a constant of the same type as gid in its place, not just 1, of course. And, I just made up the cid value.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement