中国开发网: 论坛: 程序员情感CBD: 贴子 323621
nostalgic
hibernate生成的SQL这么BT,偶在想为啥要用.
select voltageup2x2_.RQ as col_0_0_,
(voltageup2x2_.AYFZ - basicvolta3_.DYKHSX) / basicvolta3_.DYKHSX as col_1_0_,
(voltageup2x2_.AYGZ - basicvolta3_.DYKHXX) / basicvolta3_.DYKHXX as col_2_0_,
(voltageup2x2_.BYFZ - basicvolta3_.DYKHSX) / basicvolta3_.DYKHSX as col_3_0_,
(voltageup2x2_.BYGZ - basicvolta3_.DYKHXX) / basicvolta3_.DYKHXX as col_4_0_,
(voltageup2x2_.CYFZ - basicvolta3_.DYKHSX) / basicvolta3_.DYKHSX as col_5_0_,
(voltageup2x2_.CYGZ - basicvolta3_.DYKHXX) / basicvolta3_.DYKHXX as col_6_0_,
voltageup2x2_.AYFZ as col_7_0_,
voltageup2x2_.AYGZ as col_8_0_,
voltageup2x2_.BYFZ as col_9_0_,
voltageup2x2_.BYGZ as col_10_0_,
voltageup2x2_.CYFZ as col_11_0_,
voltageup2x2_.CYGZ as col_12_0_
from YH_YH customer0_,
ZC_ZDZC terminalca1_,
TJ_DYHGLRMX voltageup2x2_,
JB_DYDJ basicvolta3_
where customer0_.YHID = terminalca1_.YHID
and terminalca1_.ZDLJDZ = voltageup2x2_.ZDLJDZ
and basicvolta3_.DYBM = customer0_.gddy
and trunc(voltageup2x2_.RQ, 'mm') = to_date('2006-04', 'yyyy-mm')
and customer0_.YHID = '3122'
order by voltageup2x2_.RQ

其实在查询的时候,hibernate基本上没有用.

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录