Skip to content
Advertisement

Using top N in sql

statement 1

statement 2

I have tried the above but both are not working.

Does anybody know the reason?

Advertisement

Answer

If you want to update one row, then you can use limit:

That said, I would expect id to be unique, so no LIMIT is necessary.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement