What is more efficiency: to do update with join
or to do update with where
.
Here is my code:
Join:
CREATE procedure [dbo].[MyProc]
@tvp myType readonly
as
update tb
set pp_update=CONVERT(date,GETDATE(),101)
from myTable tb
join @tvp t on t.crc32 = tb.pp_crc32
Where:
CREATE procedure [dbo].[MyProc]
@tvp myType readonly
as
update tb
set pp_update=CONVERT(date,GETDATE(),101)
from myTable tb
where t.crc32 = tb.pp_crc32
What is prefer? and if I have 2 terms can I use join
??