缓解疲劳吃什么好:select top 1 count(username) as tot from userdb where status = 1怎么理解呀?
来源:百度文库 编辑:杭州交通信息网 时间:2024/05/13 02:21:34
请教哪位高人帮小弟解释一下,非常感谢~
语句中top 1没有什么意义,因为count(username)的结果肯定只有一行。
实际执行
select count(username) as tot from userdb where status = 1
即可。
意思是从userdb表中查询status为1的数据条数。
as tot是结果集count(username)的别名,如果在查询分析器中查看,结果集对应的列名为tot。
寻找字段status 等于1 的时候 从userdb 选择 TOP 1中的 count(username) 与 tot 同样 的字段
select top 1 count(username) as tot from userdb where status = 1怎么理解呀?
select count(*) from 学生
关于select count()
select top 10 * 问题
pb中select count(*) from table的count(*)是什么意思啊
asp中 select top 问题!~
stren="select count(*) as total from user where qun=1 "
"select count(*) Mycount from books "
SELECT Count(*) AS aa FROM是什么意思?
怎么读第二条记录sql="select top 1 * from NEWS whe