I have a table named "LOAN" with Columns - "CustomerID, Name, Address, LoanAmount, DisbursementDate, InstallmentDate".
There are 1,000,000 records in this table. I need to find out the contents of table in Row Number 400,000.
Is there a way to find out the record if Row Number is provided?
I'm executing the query in SQL Server
--I tried using Count(*) in where condition , but that threw an error.
select * from LOAN where Count(*)=400,000 --ERROR: aggregate Func. cannot be used in Where clause
--Tried using count(*) in having clause, but that resulted in a blank output.
Select Name from LOAN group by Name having Count(*)=400,000
--Then tried using @@RowCount
, but that didn't work either
Select * from LOAN where @@RowCount=400,000.