Wednesday 21 November 2018

MSSQL - How to update top 2 records in table (SQL SERVER)

Watch this example on YouTube

; with sth as (
    Select Top 2 *
    From Product
    Order by ProductID
)
Update sth SET Name = 'Something Else'

No comments:

Post a Comment