hii friends i have a first temporary table in which some column
like : client id, client name, details
and another second table : city
in which have column clientid, city name,
and want select both table with inner join
first table it have 200 record and both tables some client id same
i want select those record from first table that client id it not have in second table
i want remaining client details which client id not common in second table

Bikesh SrivastavaPosted Nov 27, 2016, 6:49 AM
Manas MohapatraPosted Nov 26, 2016, 7:49 AM
SELECT * FROM table1
LEFT JOIN table2 ON table1.ClientID = table2.ClientID
WHERE table2.City IS NULL
Or you can use EXCEPT in SQLServer
SELECT ID, NAME, AMOUNT, DATE
FROM CUSTOMERS
LEFT JOIN ORDERS
FROM CUSTOMERS
RIGHT JOIN ORDERS