without using count(*) and rownum how can we count total
record in a table

Answers were Sorted based on User's Feedback



without using count(*) and rownum how can we count total record in a table..

Answer / ganesh prasad sial

select sum(1) from emp;

Is This Answer Correct ?    38 Yes 2 No

without using count(*) and rownum how can we count total record in a table..

Answer / sudipta santra

select count(rowid) from emp;

Is This Answer Correct ?    23 Yes 4 No

without using count(*) and rownum how can we count total record in a table..

Answer / vignesh lakshmirajan

simple..!!! Findout the primary key of the table..

then..

select count(primary_key_column) from table;

thats all; becos count vil work with non-null values.

primary key cant b null..
so.. v can use count on primary key...

Is This Answer Correct ?    13 Yes 1 No

without using count(*) and rownum how can we count total record in a table..

Answer / sanrai

Select max(rownum) From dual

Is This Answer Correct ?    7 Yes 4 No

without using count(*) and rownum how can we count total record in a table..

Answer / rajesh

SQL> SELECT TABLE_NAME, NUM_ROWS FROM USER_TABLES WHERE TABLE_NAME='EMP';

TABLE_NAME NUM_ROWS
------------------------------ ----------
EMP 14

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Oracle General Interview Questions

what is the maximum number of indexes i can create for a table? What happens if i create indexes for all the columns of a table? Will it slow down the speed of retrieval

2 Answers  


How do I manually uninstall oracle client?

0 Answers  


In the oracle version 9.3.0.5.0, what does each number shows?

0 Answers  


what is cartesian product?

2 Answers  


How to invoke the data pump export utility?

0 Answers  


What is a deadlock ? Explain .

1 Answers  


How to create a single index for multiple columns?

0 Answers  


22. Display the order number, number of lines in the order, total number of items and total value for all orders that have a total value greater than $100

0 Answers   Wipro,


Can you drop an index associated with a unique or primary key constraint?

0 Answers  


how to make an oracle object

0 Answers  


How to Identify the previously inserted/updated records in already populated table.

0 Answers  


Explain drop constraint oracle?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1808)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)