output clause

External Article

Using SQL Server's Output Clause

  • Article

When you are inserting, updating, or deleting records from a table, SQL Server keeps track of the records that are changed in two different pseudo tables: INSERTED, and DELETED. These tables are normally used in DML triggers. If you use the OUTPUT clause on an INSERT, UPDATE, DELETE or MERGE statement you can expose the records that go to these pseudo tables to your application and/or T-SQL code.

2012-03-26

3,728 reads

Blogs

MVP No more, But It’s OK

By

Embracing Limitations: Finding Strength and Purpose in Hard Times For four years, I was...

A New Word: Fitching

By

fitching – v. intr. compulsively turning away from works of art you find frustratingly,...

Copilot in Microsoft Fabric

By

Microsoft Copilot is an app that uses AI to help you find information, create content,...

Read the latest Blogs

Forums

what are the software' required for sqlserver dba in laptop to install

By naga.rohitkumar

HI Team, what are the software's required for sqlserver dba in laptop to install...

The Danger of Safety Assistance Tools

By Louis Davidson (@drsql)

Comments posted to this topic are about the item The Danger of Safety Assistance...

needing to insert 2 sets of numbers to a table to use as ranges for a query

By roy.tollison

the ranges (a lot) need to have a preset spacing between each set of...

Visit the forum

Question of the Day

What's Wrong with this Table?

What's wrong with this code and causes an error?

CREATE TABLE Customer
(
    CustomerID INT NULL,
    FirstName NVARCHAR(50) NOT NULL,
    LastName NVARCHAR(50) NULL,
    Email NVARCHAR(100) NOT NULL,
CONSTRAINT CustomerPK PRIMARY KEY (CustomerID, LastName)
);


See possible answers