How To Use SELECT Statement to Count the Number of Rows in Oracle?
Submitted by: AdministratorIf you want to count the number of rows, you can use the COUNT(*) function in the SELECT clause. The following select statement returns the number of rows in the "department" table:
SQL> SELECT COUNT(*) FROM departments;
COUNT(*)
----------
27
So there are 27 rows in the "departments" table.
Submitted by: Administrator
SQL> SELECT COUNT(*) FROM departments;
COUNT(*)
----------
27
So there are 27 rows in the "departments" table.
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | How To Recover a Dropped Table in Oracle? |
☺ | How Run SQL*Plus Commands That Are Stored in a Local File? |
☺ | What Happens If You Lost a Data File? |
☺ | What Is Input Buffer in SQL*Plus? |
☺ | How To Create a New Table in Oracle? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |