sql - Insert multiple rows from select into another table -


let's have `table1(col1,col2,col3), values insert on col1 , col3 same, values insert on col2 come result of select query.

how can write query can multiple insert @ once ? example of query should :

col1  |  col2   | col3   1        val1     0  1        val2     0  1        val3     0 

if understand correctly, use insert . . .select:

insert table1(col1, col2, col3)     select 1, col2, 0     <your other query here>; 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -