Create table Tbl_output (id int identity(1,1), fname nvarchar(100), lname nvarchar(100))
Example of Output clause in case of Insert command
Declare @outputtemp Table (id int , fname nvarchar(100), lname nvarchar(100))
Insert into tbl_output(fname,lname)
Output inserted.id, inserted.fname, inserted.lname into @outputtemp
values(‘Vivek’, ‘Johari’)
Select * from @outputtemp
Example of Output clause in case of Update command
Update tbl_output set fname=’Vibodh’
Output inserted. fname , deleted.fname
where id=1
Example of Output clause in case of Delete command
Delete from tbl_output
Output deleted.*
where id=1
Discover more from Technology with Vivek Johari
Subscribe to get the latest posts sent to your email.
… [Trackback]
[…] Read More Information here to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More on to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More on to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More on to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Here you will find 75078 more Info on that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More Information here to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More Information here on that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Read More Info here to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Info to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More on on that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] There you can find 84377 more Information on that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] There you will find 69107 more Information to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Read More to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Read More to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Info on that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Read More to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More Information here to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Read More to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Info to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Information to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More on that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Find More Information here to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Read More here to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Information on that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Info to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Information to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]
… [Trackback]
[…] Read More to that Topic: techmixing.com/2012/01/sql-server-output-clause.html […]