![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
You can use TOP 1 to return only 1 row (based on the ORDER BY), something like this: SELECT TOP 1 COLUMN FROM TABLE ORDER BY COLUMN DESC Also, MIN(COLUMN) and MAX(COLUMN) may work depending on how you define last item, like: SELECT MAX(COLUMN) FROM TABLE Regards, Plamen Ratchevhttp://www.SQLStudio.com |
#4
| |||
| |||
|
|
Thank you very much, but my question is more like how to get the exact VALUE of the field (not the minimum or maximum)? |
|
is there a command/query for it? On 7 mar, 18:54, "Plamen Ratchev" <Pla... (AT) SQLStudio (DOT) com> wrote: You can use TOP 1 to return only 1 row (based on the ORDER BY), something like this: SELECT TOP 1 COLUMN FROM TABLE ORDER BY COLUMN DESC Also, MIN(COLUMN) and MAX(COLUMN) may work depending on how you define last item, like: SELECT MAX(COLUMN) FROM TABLE Regards, Plamen Ratchevhttp://www.SQLStudio.com |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |