sql - Dynamically inserting multiple rows to a table -
i need insert multiple records table. number of records depend on result of query. example:
insert table1(colm1, colm2, colm3) values(select clom1 table2, constant, constant)
in query colm2
, colm3
have constsnt values, value of colm1
differs based on ouput of table2
, , number of records inserted depend upon number of values table2
. can give me solution?
insert table1(colm1,colm2,colm3) select clom1,constant,constant table2
this should work
Comments
Post a Comment