Which one is the better query and what is the difference between both
SELECT custid, companyname
FROM Sales.Customers AS C
WHERE EXISTS
(SELECT *
FROM Sales.Orders AS O
WHERE O.custid = C.custid
AND O.orderdate = '20180212');
SELECT custid, companyname
FROM Sales.Customers AS C
INNER JOIN Sales.Orders AS O
on O.custid = C.custid
AND O.orderdate = '20180212'