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
Try this instead:
SELECT TOP 10 cust_nr, period1_bonus FROM bonus ORDER BY period1_bonus DESC
LIMIT <x>
is a mySQL construct, not an MSSQL construct. TOP
should work for you here.
Try SELECT TOP
SELECT TOP 10 cust_nr, period1_bonus
FROM bonus
ORDER BY period1_bonus DESC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With