views:

157

answers:

1

Hi guys,

i need to perform a insert query for multiple rows whereby the first column is a numeric and identical value and the second values are queried from another table.

something like

insert into table (33, select col2 from another_table);

can this be accomplished with a single statement?

+4  A: 

like this

insert into table 
select 33, col2 from another_table;
SQLMenace
in this example, the table being inserted must have only two fields: one that will receive the numeric and another of the same type as col2 from another_table
pcent