I\'m looking for something similar this in SQL Server:
SELECT TOP n WITH TIES FROM tablename
I know about LIMIT in PostgreSQL,
PostgreSQL already supports OFFEST FETCH clause and starting from version 13 it will support FETCH FIRST WITH TIES:
SELECT
[ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES } ]The WITH TIES option is used to return any additional rows that tie for the last place in the result set according to the ORDER BY clause; ORDER BY is mandatory in this case.
Query:
SELECT nums
FROM Numbers
ORDER BY nums DESC
FETCH NEXT 3 ROWS WITH TIES;
db<>fiddle demo