Kod Kütüphanem ama elime ne gelirse burada dursun diye…

Previous Record

SELECT yapısı içinde Önceki ve Sonraki Kayıt

SELECT LAG(p.FirstName) OVER (ORDER BY p.BusinessEntityID) PreviousValue, p.FirstName, LEAD(p.FirstName) OVER (ORDER BY p.BusinessEntityID) NextValue FROM Person.Person p       Kaynak: sqlauthority.com

Learn More