Home Forums SQL Server 2008 SQL Server 2008 - General Catch invalid object and rollback transaction RE: Catch invalid object and rollback transaction
saravanan.a 88885
SSC Eights!
Points: 993
More actions
October 9, 2013 at 12:53 am
#1656998
Hi Try the following......
if exists(select * from sysobjects where name ='a')
begin
print 'passed'
UPDATE a
SET a.b = 1
FROM a,c
WHERE a.t = c.t
end
else
print 'Failed'