Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 155 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates
SELECT Id, DisplayName FROM Users ORDER BY CreationDate DESC LIMIT 10;

That query didn't work on data.stackexchange.com. I guess LIMIT isn't a key word. As such how would I go about doing a LIMIT?

share|improve this question
4  
It's SQL Server not MySQL... Use TOP. – ben is uǝq backwards Mar 24 '13 at 19:32
up vote 11 down vote accepted

You want TOP:

SELECT TOP(10) Id, DisplayName FROM Users ORDER BY CreationDate DESC
share|improve this answer
4  
It's SQL Server 2012, so you can also use the new (pretty verbose) offset 0 rows fetch next 10 rows only – balpha Mar 24 '13 at 19:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .