Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use alias in query

 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm new in hibernate and i would like concat 2 fields and put in an alias
like this i mysql:

SELECT CONCAT(a,b) AS c from table ORDER BY CONCAT(a,b)

How can i use this in the query hibernate

Query q = session.createQuery("FROM table order by ?");

thanks for your help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic