永发信息网

hql子查询中怎么获取参数值

答案:2  悬赏:40  手机版
解决时间 2021-03-20 10:53
  • 提问者网友:饥饿走向夜
  • 2021-03-19 21:37
传过来的参数是userId
select l from LoginLog l where l.loginId in (select max(lt.loginId) from LoginLog lt where lt.userInfo.userId='+userId')这语句是错的,请更正...
最佳答案
  • 五星知识达人网友:孤独的牧羊人
  • 2021-03-19 22:57
"select l from LoginLog l where l.loginId in (select max(lt.loginId) from LoginLog lt where lt.userInfo.userId="+userId+")"
全部回答
  • 1楼网友:旧脸谱
  • 2021-03-19 23:13
sqlect a1,(select b1 from b where b2 = a1 and rownum=1) from a,也可以再嵌套里排序
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯