thank you ,but I want to know details
I now know many ways can use. But I want a high efficiency way. I think use cursor will slowly.
I think if execut a statement like "exists (select * from tablename)", dbms will only search in one index. If a index(for example primary key index) have a record data, the result will return "true". if the index is empty, the result will return "false". Dbms needn't read actual data from disk.
But I think if use cursor, it will execute slowly. For example,
if I declare a cursor like follows:
cursor cu_data is
selece * from tablename.
I think when I open the cursor, Dbms must read actual data from disk to fill the cursor. Reading actual data from disk is very slowly. I only need whether there is any data in result. It's why I want to use prafful's way.
Could you tell me the truth?
Please help
thanks