计数的,比如select count(ID) from table where ID<>1 就是选出ID列不等于1的行数
[此贴子已经被作者于2007-3-1 17:32:16编辑过]
count(*) 选出数据表的行数,select count(ID) from table where ID<>1这样的话,如果id是null,也会忽略
不是啊,count(*)选出的记录是大于或等于count(id),你去做个实验create table shiyan(id int,name varchar(10))insert into shiyan select 1,'a'insert into shiyan(name) select 'b'select count(*) from shiyanselect count(id) from shiyan第一个返回的是2,第二个返回的是1,因为id有一行是null