Topic: 求助(SQL, 查询时返回记录的行数)

  Print this page

1.求助(SQL, 查询时返回记录的行数) Copy to clipboard
Posted by: lys0410
Posted on: 2006-08-19 17:36

请问:JAVA类中哪个类的方法在连接数据库查询记录时能返回记录的行数?

2.Re:求助 [Re: lys0410] Copy to clipboard
Posted by: Novo
Posted on: 2006-08-19 18:01

用查询语言也可以实现啊.
select Count(*) from xxxxxx wherexxxxxx

3.Re:求助 [Re: lys0410] Copy to clipboard
Posted by: lys0410
Posted on: 2006-08-19 18:23

那个我知道
但是在连接数据库时,在JAVA中的发送SQL文时可以写多少行的SQL语句呢?
只能写一条吗?

4.Re:求助(发送SQL文时可以写多少行) [Re: lys0410] Copy to clipboard
Posted by: why
Posted on: 2006-08-19 20:24

lys0410 wrote:
那个我知道
但是在连接数据库时,在JAVA中的发送SQL文时可以写多少行的SQL语句呢?
只能写一条吗?

if the DB server supports this, you could have multiple SQL statements in a String and use execute() instead of executeQuery() or executeUpdate(), and then getMoreResults() or getUpdateCount() to retrieve individual ResultSet or update count.

5.Re:求助(SQL, 查询时返回记录的行数) [Re: lys0410] Copy to clipboard
Posted by: jameszhang
Posted on: 2006-08-20 07:42

jdbc 有 执行一条 SQL,也可以 批量执行 SQL,同样SQL只是可以传入参数,批量执行


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923