如题!!!!!!

解决方案 »

  1.   

    select count(*) from table;
      

  2.   

    可以使用分页查询select t1.*,rownum rn from (select * from emp) t1 where rownum<=10;查询的结果是编号小于10的记录
      

  3.   

    select count(*) from t;或者:
    00:06:33 hr@ORCL (^ω^) select  NUM_ROWS from user_tables where table_name='T';  NUM_ROWS
    ----------
             4或者:
    00:06:04 hr@ORCL (^ω^) select 1 from t;         1
    ----------
             1
             1
             1
             1或者:
    select * from t;
      

  4.   


    --第一种
    select sum(num_rows) from user_tables where table_name='EMP';--第二种
    select count(ename) from emp;
      

  5.   

    select count(*) from table_name;
    或者
    select count(1) from table_name;>select count(ename) from emp;
    这种做法,如果ename列存在null值,结果是不对的,因为null值不会统计在内。
      

  6.   

    有主键的话。ID
    select count(ID) from table 
    没有主键的话
    select count(*) from table
      

  7.   

    有主键的话。ID
    select count(ID) from table  
    没有主键的话
    select count(*) from table
      

  8.   

    --查询表记录的行数一般使用:
    select count(*) from table_name 或 select count(1) from table_name;select num_rows from user_tables where table_name='EMP'; 这个通常是不准确的
      

  9.   

    --查询表记录的行数一般使用:
    select count(*) from table_name 或 select count(1) from table_name;select num_rows from user_tables where table_name='EMP'; 这个通常是不准确的