-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Insert multiple row items via SQL
PostPosted: Wed Oct 28, 2009 4:56 pm 
Beginner
Beginner

Joined: Thu May 28, 2009 10:25 am
Posts: 21
Consider the following SQL example:

Code:
mysql>     INSERT INTO Employee (Empid,Empname,Salary,DOB) VALUES
    ->                                          (01,'John',2014,20041202),
    ->                                          (02,'Tom',4021,20030411),
    ->                                          (03,'Mary', 22,20080223),
    ->                                          (04,'Sam', 25,20081015),
    ->                                          (05,'Tim', 29,19990126);



I need to achieve the same in Hibernate via a SQL query to an unmapped table i.e. use a SQLQuery.

The complexity I'm facing is that the number of 'Employees" is very large (let's say 1,000,000) > I could use MANY named parms to set id, name, salary, dob but is there a way I could pass in all this information in one collection

say, . this or something similar
.... sqlQuery.setAParameterList(List<Array of Parms.>


Or can I do this using multiple parameterlists ?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.