String sql = " select *from choice a where a.choiceId not in (select (choiceId) from paperchoice b where b.paperId = "
+ paperId + ")";
3Q啦!!!求学习~~~
+ paperId + ")";
3Q啦!!!求学习~~~
解决方案 »
- 帮忙看看这个错误问题是由什么引起的
- 各位大哥,如何从jsp页面向后台action传值
- JPA
- 小妹跪求myEclipse开发Hibernate实例(数据库为SQL Server2000)
- 点击后退按钮页面失效
- spring+hibernate+strust出现了这样的错误,该怎么解决啊?
- 关于sax解析xml的问题,大家是不是都有这样的问题?
- 请问一个关于JSP中传递参数的问题
- 关于message的问题,很奇怪,请问<message-resources factory="com.aaa.TextMessageResourcesFactory" parameter="."/> 这里parameter=".
- Struts2上传文件时,只产生一个临时文件。
- 求jsf-facelets.jar 1.1.15以上版本
- radio被选中然后单击产生事件
hql="from choice a where a.choiceId not in (select choiceId from paperchoice b where b.paperId =?"
这样不行?
比如choice 对应的是Choice 实体类
paperchoice 对应Paperchoice 实体类的话
且都有choiceId字段 属性的话
String hql = " select c from Choice as c where c.choiceId not exists (select p.choiceId from Paperchoice as p where p.paperId = " + paperId + ") " ;用exists 性能比 in 要好点、少数据下in 快些、 数据量多就是exists会快点、
+ paperId + ")";