I’m trying to retrive the 10 biggest numbers from a table called bonus.
But I’m getting this error message:
Incorrect syntax near 'LIMIT'
My code:
SELECT cust_nr, period1_bonus FROM bonus ORDER BY period1_bonus DESC LIMIT 10
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since this question is also tagged w/ c#, I’m assuming you’re also interested in executing this in c#. Here is the linq-to-sql equivalent of the SQL code.
Edit – I see that the c# tag has now been removed from the question. Still, my answer might help you (or others).