inner join(内连接)
left outer join(左外连接)
right outer join(右外连接)
full join (全连接,并不常用)
HQL中的条件用with即:left join ... with...
SQL中的条件用on即:left join ... on...
语句inner join, left outer join 以及 right outer join 可以简写。
from Cat as cat join cat.mate as mate left join cat.kittens as kitten
通过HQL的with关键字,你可以提供额外的join条件。
from Cat as cat left join cat.kittens as kitten with kitten.bodyWeight > 10.0
由此可见,HQL的with就是sql中ON的用法
你可以试试看用new simpledateformat("yyyy-mm-dd hh:mm:ss").format(begintime); 转换为string
然后用oracle本身的函数to_date("2008-11-11 11:11:11", "yyyy-mm-dd hh24:mi:ss");
string formatbgstring = new simpledateformat("yyyy-mm-dd hh:mm:ss").format(begintime);
string formatendstring = new simpledateformat("yyyy-mm-dd hh:mm:ss").format(begintime);
"and t.begintime > to_date('" + formatbgstring + "', 'yyyy-mm-dd hh24:mi:ss') and t.endtime < to_date('"="" +="" formatendstring="" +="" "',="" 'yyyy-mm-dd="">
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....