How to get 5 th record of the table using stored procedure...
-
Dear Bro, :confused:I want to fetch 5 the record of the table or query using Stored Procedure it is possible but i dont know how? please help me. I want to fetch the record of Employee whose Payment is Highest and on 5 th rank using Stored Procedure. Using SQL 2000 database Thanks in advanced:rose: Sasmi
-
Dear Bro, :confused:I want to fetch 5 the record of the table or query using Stored Procedure it is possible but i dont know how? please help me. I want to fetch the record of Employee whose Payment is Highest and on 5 th rank using Stored Procedure. Using SQL 2000 database Thanks in advanced:rose: Sasmi
-
Dear Bro, :confused:I want to fetch 5 the record of the table or query using Stored Procedure it is possible but i dont know how? please help me. I want to fetch the record of Employee whose Payment is Highest and on 5 th rank using Stored Procedure. Using SQL 2000 database Thanks in advanced:rose: Sasmi
try this,
declare @n int SET @n=5 SELECT DISTINCT (a.salary) FROM Table1 a WHERE @n=(SELECT COUNT(DISTINCT(b.salary)) FROM Table1 b WHERE a.salary<=b.slaray)
They laugh at me; they think I’m different. I laugh at them, ‘coz they are all same!!
CrazySanker