Hi there:
(1) What database are you using? (the proposed solutions might vary depending on your physical situation).
(2) It's not quite clear just what it is you are looking for. i.e. Is it the SQL statement needed to find the lowest key? (And if so, a bit more commentary re: the table definition and sample data would help us narrow down how to help you.)
what if a record was deleted (in a cascaded delete) and you wanted to use the key value of the record just deleted i.e. the value needed is currently less than the max key value returned.
SQL Server 2000. The key is varchar but only numbers are allowed. The key may contain 1,3 5,10,50. There are gaps because the key is entered by the user. Dumb, but I didn't write the thing.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.