How to insert multiple rows with a single INSERT.

From: Tuhin Kumar <tkumar_at_ipolicynet.com>
Date: 14 Jul 2003 10:35:37 -0700
Message-ID: <e4ad76f5.0307140435.388f36ca_at_posting.google.com>


Hi,

   I would like to know how to insert multiple rows into a table, using a single INSERT statement. My requirement is like this I have a table ABC which contains multiple employees entries with empId as the primary key. Now I want to insert the all the empid multiplied by X and y (<EMPID>*x*y) into a table DEF plus filling other columns for each employee rows.

 Table ABC


EMPID  QQQ   LLL      MMM
1       5    "L"       20
4       45   "J"       43
6       63   "Q"       89

The table DEF need to be populated from ABC as below  Table DEF


EMPIDMOD    KKK     MMM
1*X*Y        0      786
4*X*Y        0      786     
6*X*Y        0      786

  

Thanks,
Tuhin Received on Mon Jul 14 2003 - 19:35:37 CEST

Original text of this message