﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 General Discussion  / output behavior / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 22:16:36 GMT</lastBuildDate><ttl>20</ttl><item><title>output behavior</title><link>http://www.sqlservercentral.com/Forums/Topic712311-149-1.aspx</link><description>/*I'm had  a question on the behavior of OUTPUT statement (I would assume this applies to DELETE myTblA OUTPUT INTO myTblB and INSERT myTblA OUTPUT INTO myTblB as well).Below is my script: */-- begin testing output statementif object_id('tempdb.dbo.#tA','u') is not null drop table #tAif object_id('tempdb.dbo.#tB','u') is not null drop table #tBcreate table #tB ( 	id int identity( 1, 1 )--,--	f1 char(1) )select id = identity(int,5,1)into #tA--insert #tB (f1)--select 'a'select * from #tAdelete #tAoutput deleted.id--, 'b'into #tB (id)--, f1)select * from #tAselect * from #tB-- end testing output statement/* begin questions1. Does OUTPUT set identity_insert #tB on automatically for a table with Identity column?*/ end questions</description><pubDate>Thu, 07 May 2009 12:04:53 GMT</pubDate><dc:creator>keycard</dc:creator></item></channel></rss>