华南电子展:这样一条sql语句怎么些?
来源:百度文库 编辑:杭州交通信息网 时间:2024/05/10 08:41:06
在返回被查询记录的同时,也返回所有符合条件记录之条数。如下方法为何不对
select count(*) as TOTAL,name,email from user where age<'18'
select count(*) as TOTAL,name,email from user where age<'18'
select count(*) as TOTAL from user where age<'18'
select name,email from user where age<'18'
两天分开,因为其他的是多条,total只有一行
这样写好像不行,不用一条不行吗,
18 不用加引号
rs.open "select name,email from user where age<18"
rs.recordcount 就是记录条数