Shell Scott
Shell Scott

Reputation: 1909

How to get last record from column if there is no any unique ID for this record?

For example there are two columns, "timestamp" and "value".

time_stamp             value

2014-12-11 08:00       12424     
2014-12-11 08:00       42
2014-12-11 08:00       9444444
2014-12-11 08:00       2323
2014-12-11 08:00       447

How do I get 447?

I tried SELECT LAST(value) FROM table_name;
but think I'ts actually only for MS Access. Any idea?

I was looking for an answer in almost the same questions here but still can't figure this out. Thanks

Upvotes: 0

Views: 41

Answers (1)

Ruby van Soelen
Ruby van Soelen

Reputation: 145

select * from table_name order by time_stamp desc limit 1

Upvotes: 1

Related Questions