IF object_id(‘tempdb..#test’) is not nullIF object_id(‘tempdb..#test’) is not null

drop table #test

CREATE TABLE #test(intid INT,name VARCHAR(30),age INT)
Insert into #test(name,age)Select ‘rmn’,’32’GO

declare @name varchar(50)

UPDATE #test SET  age = ’65’, @name = name WHERE  name=’rmn’

Select @name

Advertisements