Quantcast
Channel: outer join or subquery
Browsing all 4 articles
Browse latest View live

outer join or subquery

If you are using SQL SERVER 2008, Following is the easy and fast approach: MERGE Table1 T USING (SELECT ridFROM Table2 ) AS S ON T.rid = S.ridWHENNOT MATCHED BY TARGET THENINSERT ( table1id, rid, name,...

View Article



outer join or subquery

There may well be no difference, the query optimizer may generate the same plan for both of these queries.If you are on SQL 2008 or later, I would use the MERGE command merge into table1 using table2on...

View Article

outer join or subquery

outer join is usually expensive and if you can get the job done with subquery, i will recommend that you go ahead with that. Joins help get cross multiplied views and that is not your requirement here.

View Article

outer join or subquery

hello ,i have two tables, e.g.table1 ---    table1id, rid, name, add, city, state, country ....table2 ---    table2id, rid, name, ......note: rid column is common in both tablenow i want to insert...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images