select count(*) from table1然后判断结果是否为0即可。

解决方案 »

  1.   

    Query.SQL.Text := 'select count(*) from tablename';
    Query.Open;
    if Query.Fields[0].AsInteger <= 0 then
      { TODO : 空 }
    else { TODO : 有记录 };
    Query.Close;
      

  2.   

    Query.SQL.Text := 'select count(*) from tablename';
    Query.Open;
    if Query.Fields[0].AsInteger <= 0 then
      { TODO : 空 }
    else { TODO : 有记录 };
    Query.Close;
      

  3.   

    IF TABLE.ISEMTY THEN
      ....
    或者SELECT * FROM TABLENAME
      IF QUERY1.ISEMTY THEN
       ....
      

  4.   

    if  (query.eof and query.bof) then 为空