MYSQL 中max & lpad 语句在Hibernate如何使用?

04-10-15 zhangliwen
Hi,我有一个问题,有如下一个MySQL如何在Hibernate中使用,并取得结果?

MYSQL语句如下:select max(lpad(gw_trx_id, 16, '0000000000000000')) from FP_TRANSACTION;

其中,gw_trx_id为字符串数字

谢谢!!!

napoleonn
2004-10-18 16:32
From Hibernate Doc v2.1.6 --Page 97

You may also express queries in the native SQL dialect of your database. This is useful if you want to utilize

database specific features such as the CONNECT keyword in Oracle. This also allows for a cleaner migration

path from a direct SQL/JDBC based application to Hibernate.

猜你喜欢