Try This:
SELECT MAX(Row) FROM (SELECT ROW_NUMBER() OVER(ORDER BY ID DESC) Row FROM USERS) UserQuery
But Count is Best Method.
which of the following is better to find the number of rows in a table? 1. count(1) 2. count(*) 3. count(rowid)
Its a very basic question but it would be good if anyone can answer with some explanations. When we type select * from dba_users; in sql plus it will show N rows selected and total records whereas when we type select * from employee it would show only records but not the total count.
select * from dba_users;
select * from employee
I am building a small web application of online library and I want to find out the difference between issue date and Submission date of the books. My sql table has 5 values 1) name 2) ID number 3) Issue date 4) Book 5) Submission Date. please help me with the Sql Statement that i should use to solve this problem.