tags:

views:

29

answers:

1

I want get the last value for determine column for example in this table id name 1 Samer 2 Fahd 3 Hames 4 fuad

I want get only last name "fuad" in sqlserver

all thanks

+1  A: 

Order by ID descending and select top 1 name:

select top 1 Name from MyTable order by ID desc
Anton Gogolev
thank you Athonbut if the data no ordered by Id I want get the last value in any ordered for any fieldall thanks for help