Hi
How to use Single update Query for both tables
CREATE TABLE MAS1
(
Id int primary key identity(1,1),
MasName varchar(50),
Tempid int,
RefTempId int
)
CREATE TABLE MAS2
(
Id int primary key identity(1,1),
Tempid int,
RefTempid int
)
Insert into MAS1 values('John',1,2)
Insert into MAS1 values('John',3,5)
Insert into MAS1 values('John',8,11)
Insert into MAS2 values(1001,2001)
Insert into MAS2 values(3001,5001)
Insert into MAS2 values(8001,1001)
select * from MAS1
select * from MAS2
--I need single update Query but Both table column
--ex:set MAS1.Tempid=MAS2.Tempid,Mas1.RefTempid=Mas2.RefTempid
-- where mas1.id=mas2.id and mas1.id=1
Mark as Answer if its helpful to you
Kumaraspcode2009@gmail.com