I have a piece of code I am not familiar with sql server, only oracle. Can someone tell me what this is doing? Thanks.
- What is the @flowcontrol
- what is set @flowcontrol = @@error? Why two @@?
- Why is print twice? What does print do here?
- What is raiseerror doing?
Use [ra8]
declare @flowcontrol integer
set @flowcontrol = @@error
if @flowcontrol = 0
begin
print ' '
print 'create temp[nw] table'
create table [dbo].[temp] ([feild] [varchar] (200) nulll
end
else
begin
print ' '
print ' '
raiserror('raiseerror: create temp[nw] failed',12,1) with seterror
end
go