Avenger001
April 21st, 2003, 02:27 PM
Is there a way to retrieve just the last entry in the table thru an sql querry.
Ex.
In my table, right now, I have 665 entries, and I would like to retrieve just the 665th element.
If it makes any difference, i'm going to be using this querry in my c# application.
So far, my querry is :
"SELECT * FROM myTable ORDER BY uniqueID DESC"
And with that querry, the 1st element would be the 665th element, then I would just take this element with a bite of coding.
But i'm sure that if there would be a select statement to do this, it would be much faster than selecting 665 elements.
Thanks for any help on this.
Ex.
In my table, right now, I have 665 entries, and I would like to retrieve just the 665th element.
If it makes any difference, i'm going to be using this querry in my c# application.
So far, my querry is :
"SELECT * FROM myTable ORDER BY uniqueID DESC"
And with that querry, the 1st element would be the 665th element, then I would just take this element with a bite of coding.
But i'm sure that if there would be a select statement to do this, it would be much faster than selecting 665 elements.
Thanks for any help on this.