I want to update a table and get the updated records from default “inserted” table of SQL Server.
Updating part of the following query is successful but why does the remaining ” SELECT * FROM inserted” part of the query raise error as “Invalid object name ‘inserted’.”?
use AdventureWorks
go
UPDATE TOP(50) Person.Address
SET City= 'PARIS'
SELECT * FROM inserted
You would want to do this:
unless you want the old value, in which case use deleted.*