Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

The OUTPUT clause and T-SQL Syntax Expand / Collapse
Author
Message
Posted Wednesday, July 24, 2013 5:58 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 6:22 AM
Points: 271, Visits: 96
Good and tough question :)
Post #1477015
Posted Wednesday, July 24, 2013 11:14 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Wednesday, October 1, 2014 10:48 AM
Points: 4,126, Visits: 3,427
This was an interesting one - thanks, Pramod!
Post #1477177
Posted Thursday, July 25, 2013 2:57 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:06 PM
Points: 17,805, Visits: 15,716
Lokesh Vij (7/22/2013)
Good Question Pramod. But explanation could have been refined.


+2




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #1477753
Posted Thursday, August 1, 2013 8:21 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, September 14, 2014 12:30 AM
Points: 253, Visits: 540
Sorry, seems something not clear in this question, in the Question (select 4) what it means
i am choosing 2 3 5 it say i am wrong
if object_id('test2') is not null
drop table test2
if object_id('test1') is not null
drop table test1

create table test1 (a int not null primary key);
create table test2 (b int,a int )
GO

--statement 1
insert into test1
output inserted.a
select 1
GO

--statement 2
create trigger trig_test1
on test1 after insert
as
select 2
GO

--statement 3
insert into test1
select 3
GO

--statement 4
insert into test1
output inserted.a
select 4
GO

--statement 5
declare @temp as table (b int)

insert into test1
output inserted.a
into @temp
select 5

select * from @temp
GO

So what is statement 1




Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script
Post #1479964
Posted Friday, August 2, 2013 1:44 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, October 10, 2014 7:07 AM
Points: 3,545, Visits: 2,654
Good QOTD. And some good clarification by Hugo (as always).
Post #1480286
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse