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
Post a Comment