Reputation:
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
Upvotes: 0
Views: 795
Reputation: 115819
Order by ID
descending and select top 1 name
:
select top 1 Name from MyTable order by ID desc
Upvotes: 1