SQL Server 2008 R2 Management Studio does not recognized my throw in the below example, it says
incorrect syntax near Throw
I am trying to throw an error here, so I can handled it in my website when someone insert the same value twice.
Begin Try
insert into BusinessID (BusinessID) values (@ID)
insert into BusinessID (BusinessID) values (@ID)
End Try
Begin Catch
Print 'PK already exist'
THROW
End Catch