Home > database >  Selecting 2 biggest NIP from the table
Selecting 2 biggest NIP from the table

Time:12-23

How do I select the 2 of the biggest NIP from the table? Can someone help me? I only manage to get the highest one.

[This is my table]

1

I've tried the TOP function but it doesn't work.

Thanks in advance!

CodePudding user response:

If you wrote your query as you posted, it should just be to write SELECT TOP 2 instead of SELECT 2 TOP

CodePudding user response:

Seems like you are using MySQL , the syntax is like this :

‘’’ Select * From tablename Order by nip desc limit 2 ‘’’

  • Related