-->
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.  [ 4 posts ] 
Author Message
 Post subject: HQL update syntax
PostPosted: Thu Apr 27, 2006 11:18 am 
Newbie

Joined: Thu Apr 27, 2006 11:14 am
Posts: 2
Hi,

Maybe I'm just looking int the wrong spot or maybe it isn't possible but can someone provide me with the syntax for updating multiple rows using HQL?

For example something like this:
update Table set col1=newVal1, col2=newVal2 where col3=aValue and col4=bValue;

Obviously that doesn't work or I wouldn't be posting ;p but:
update Table set col1=newVal1 where col3=aValue;
seems to work quite fine so I'm sure it's possible, I just don't know the syntax.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 27, 2006 11:22 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
http://www.hibernate.org/hib_docs/v3/re ... tch-direct

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 27, 2006 11:57 am 
Newbie

Joined: Thu Apr 27, 2006 11:14 am
Posts: 2
Yes, I've looked at that documentation.

You'll notice it doesn't specifically show how to update multiple columns. I posted that I am not having any trouble updating a single column.

If someone could explain how to or post an example of upating multiple columns from an HQL update statement I would appreciate it.

Thanks.


Top
 Profile  
 
 Post subject: Re: HQL update syntax
PostPosted: Tue Mar 16, 2010 6:03 am 
Newbie

Joined: Wed Aug 05, 2009 3:19 am
Posts: 2
I have the same question. Did anyone here figured out how to do a multiple rows update?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.