how to know the row number in sql table ?

0 Montaser Qasem · January 19, 2015
Hello guys, i'v been recently trying to execute a query to define the number of the row which i work with such as:

Table name:Employee
  id   name  salary
   5   john     1000$
   7   bucky   1500$
   10 alex      500$
   9   tuna      600$

in this case employee john has the row number 1 and bucky number 2
so how i can know this in sql query ?
i searched on google and all said that use function called NUMBER_ROW()  and i tried to use it but it keeps telling me that is does not exist at all so any help to me on order to know how i work with that Guys ? :)

Post a Reply


Oldest  Newest  Rating
0 Montaser Qasem · January 19, 2015
i'm making a pagination buttons in my website to get an oledst posts or comments etc like that so i want this query to help me out of it :)
0 Montaser Qasem · January 19, 2015
Branislav Lazic
Thank you man :) you solved my problem , i didn't know the offset untill now thank you:D
  • 1

SQL & Databases


Everything SQL and Databases related in here!

Bucky Roberts Administrator