奇迹暖暖少女第二卷:select count(*) as rec_count from wq_action where username='"&username&

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/11 04:49:17
select count(*) as rec_count from wq_action where username='"&username&这个count(*) as rec_count什么意思.不懂啊
那他这样做的目的 是什么?

count(*)是统计数据库表中有多少列
count(*) as rec_count from 是把count(*)赋值给rec_count
已经很详细了。

count(*) as rec_count列的重命名 结果中列的名字就是 rec_count 。
如果去掉 as rec_count 列的名字 count(*)
(结果也就是Select 语句检索的数据)

Select 语句检索的数据 而 count(*)是统计数据库表中有多少列 count(*)是把值负给 as rec_count 中的 rec_count 而AS是重命脉名

as后面表示重命脉名。
执行完查询,你可以直接用这个变量。