Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 206069

Re: Best way to get the highest id in a region

$
0
0

Assuming you have an index defined on id, you could do something like this to get the first value:

 

SELECT DISTINCT * FROM /Customer.keys ORDER BY id ASC LIMIT 1

 

Or, conversely to get the highest value:

 

SELECT DISTINCT * FROM /Customer.keys ORDER BY id DESC LIMIT 1

 

--Jens


Viewing all articles
Browse latest Browse all 206069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>