join vs inner join
-- Rows with ID existing in both a and b
-- JOIN is equivalent to INNER JOIN
SELECT a.ID, a.NAME, b.VALUE1 FROM table1 a
JOIN table2 b ON a.ID = b.ID
WHERE a.ID >= 1000;
-- ⇓ Test it ⇓ (Fiddle source link)
join vs inner join
-- Rows with ID existing in both a and b
-- JOIN is equivalent to INNER JOIN
SELECT a.ID, a.NAME, b.VALUE1 FROM table1 a
JOIN table2 b ON a.ID = b.ID
WHERE a.ID >= 1000;
-- ⇓ Test it ⇓ (Fiddle source link)
merge clause with inner join
MERGE table1
USING (SELECT table3.keycolumn,
table2.DataColumn1,
table2.DataColumn2
FROM table2
INNER JOIN table3
ON table2.anotherKey = table3.anotherKey
WHERE table2.anotherKey = 'A1') tmpTable
ON
table1.keyColumn = tmpTable.keyColumn
WHEN MATCHED THEN
UPDATE
SET table1.DataColumn1 = tmpTable.DataColumn1
,table1.DataColumn2 = tmpTable.DataColumn2;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us