Outline ·
[ Standard ] ·
Linear+
INNER MERGE JOIN, in T-SQL, what is this?
TSk town shit
|
Feb 10 2019, 03:12 PM, updated 6y ago
|
|
Hi /K, can anyone share what is the usefulness of inner merge join? I tried to search the net, can't get much info about that. Fyi, this is from the book <<<Microsoft.Press.Exam.Ref.70-761.Querying.Data.with.Transact-SQL>>> CODE SELECT EL.country, EL.region, EL.city, EL.numemps, CL.numcusts FROM dbo.EmpLocations AS EL INNER MERGE JOIN dbo.CustLocations AS CL ON EXISTS (SELECT EL.country, EL.region, EL.city INTERSECT SELECT CL.country, CL.region, CL.city); The screenshot below shows two different statements run, and they return the same result:
|
|
|
|
ragk
|
Feb 11 2019, 12:04 PM
|
|
https://logicalread.com/sql-server-merge-jo...2/#.XGDzkzMzaUkread multiple explanation, seems like a more efficient join if both are available in order compared inner join & merge join query, merge join query sort the table b4 it joined it
This post has been edited by ragk: Feb 11 2019, 12:08 PM
|
|
|
|
TSk town shit
|
Feb 12 2019, 11:40 PM
|
|
QUOTE(ragk @ Feb 11 2019, 11:04 AM) https://logicalread.com/sql-server-merge-jo...2/#.XGDzkzMzaUkread multiple explanation, seems like a more efficient join if both are available in order compared inner join & merge join query, merge join query sort the table b4 it joined it
thanks for explaining
|
|
|
|