I have two tables 1->CompanyMaster_tbl
in this having Two fields . Cid and CompanyName
,
Cid is the primary key of this table
2->DepartmentMaster_tbl
in this having 4 fields. dtid,dtname,dtphon,dtmail,Cid
.
dtid is the primary key,and Cid is the foreign key
I have two update query like this:
UPDATE CompanyMaster_tbl SET CompanyName = @CompanyName WHERE Cid = @Cid
update DepartmentMaster_tbl set dtName = @dtName,dtPhone = @dtPhone,dtEmail = @dtEmail where dtId=@dtid
is there any way to write this two query in single line with any of our join condition