-->
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.  [ 2 posts ] 
Author Message
 Post subject: How can I update a certain number of rows using mySql?
PostPosted: Tue Jun 01, 2010 11:15 am 
Newbie

Joined: Tue Jun 01, 2010 11:09 am
Posts: 3
Hi all,
I have a problem doing the following update:

UPDATE Esbinteraction e SET e.owner = :owner WHERE e.label = :label and e.owner = 0 and status = :status limit :count

I'm using mySql, but that query doesn't work cause hibernate doesn't know limit token, while, with oracle, i could use the queryString

UPDATE Esbinteraction e SET e.owner = :owner WHERE e.label = :label and e.owner = 0 and status = :status and rownum<:count

without any problems.
How can i do the same with mySql?
Thanks a lot.
Danilo


Top
 Profile  
 
 Post subject: Re: How can I update a certain number of rows using mySql?
PostPosted: Thu Jun 03, 2010 4:55 am 
Newbie

Joined: Tue Jun 01, 2010 11:09 am
Posts: 3
Any ideas?


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

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.