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 connection pooling in oracle?

0 Answers  


What is save point in oracle database?

0 Answers  


How to insert a new row into a table in oracle?

0 Answers  


is there a tool to trace queries, like profiler for sql server?

0 Answers  


What is using clause and give example?

0 Answers  






Can an Integrity Constraint be enforced on a table if some existing table data does not satisfy the constraint ?

2 Answers  


11. Display the client number and name and the client number and name of the person who referred that client.

0 Answers   Wipro,


How can we find out the current date and time in oracle?

0 Answers  


Can you have more than one content canvas view attached with a window ?

0 Answers   Oracle,


What is a snapshot in oracle database?

0 Answers  


what are the default admin accounts in Oracle 10g ?

0 Answers   MCN Solutions,


19. Display all clients whose name begins with the letter J or contains the letter M anywhere or contains E as the third letter.

2 Answers   Wipro,


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • 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)