当前位置:数据库 > MySQL >>

struts2 的应用 数据库是Mysql 提示sql语句错误

PreparedStatement pstmt=conn.prepareStatement("select top "+pageSize+" (l.bookId,l.ISBN,b.bookName,b.publisher,b.price,l.ltime) from lend as l,book as b where readerId=? and b.ISBN=l.ISBN " + "and l.bookId not in (select top "+pageSize*(pageNow-1)+" l.bookId from lend as l)");
答案:下面的语句在我的SQL2005数据库中测试通过,你更改成你的表列和参数即可:

select top 2 I.username,J.password 
from Authority as I,SalePerson as J 
where I.password not in
(select top 1 password from Authority)

上一个:C#无法输入数据库MySQL
下一个:mysql 数据库

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,