How to find the Nth record from the sql table #sql #sqlqueries #sqlserver #coding #shorts

preview_player
Показать описание
How to find the Nth record from the sql table #sql #sqlqueries #sqlserver #coding #shorts #programming #youtubeshorts
Рекомендации по теме
Комментарии
Автор

select * from table name order by column name limit 1 offset 6;

pankajparmar
Автор

What an interview question 😂

The answer given is fine but I'd definitely question the interviewer with data stored in a properly normalised database shouldn't be every queried by row number it should be queried by ID, that's much better practice.

scrachatron
Автор

SELECT TOP 9 *
FROM employee
ORDER BY empid ASC;

sambanelluri
Автор

Why not just select * from table where id=n ?

mbeloch
visit shbcf.ru