Monday, January 25, 2010

efficiant way to check the table is empty

----very efficiant way to check the table is empty
--or
-----checking the first rows value
=====================================================
---empno is primary_key column
--or
---empno is index column

select /*+ FIRST_ROWS */ empno from emp where rownum = 1;

No comments: