Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Object Relational Mapping and the fly likes How to view the query output  of single column in hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to view the query output  of single column in hibernate" Watch "How to view the query output  of single column in hibernate" New topic
Author

How to view the query output of single column in hibernate

vinoth dev
Greenhorn

Joined: Mar 26, 2013
Posts: 4
Hi , Please kindly help me on this, I'm extracting only one column values from the table employee and I want to show this in the system output.
I'm able to show all the columns using list with iterator. But how to show if I only extracting single column.

Query sql = session.createQuery("select firstName FROM Employee");


thanks in advance .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to view the query output of single column in hibernate