数据库中如下:xh cz xm
110 0 1
110 0 2
110 0 3
sql语句:select distint xh from table where cz='0'执行的结果:adoquery.recordcount=3why????????????
为什么??
110 0 1
110 0 2
110 0 3
sql语句:select distint xh from table where cz='0'执行的结果:adoquery.recordcount=3why????????????
为什么??
ADOQuery1.OPen;再试试
grouop by xh
begin
ADOQuery1.Active :=false;
ADOQuery1.SQL.Clear ;
ADOQuery1.SQL.Add('select distinct xh from test where cz=''0''');
ADOQuery1.Active :=true;
showmessage(inttostr(ADOQuery1.RecordCount));
end;做了个简单测试,发现不了你说的情况。