Plz tell me what is better between 2 query in mssql ?
;with ab as (select a.*,b.CategoryName from Products a
left join Categories b on a.CategoryID = b.CategoryID where b.CategoryID = 2)
select * from ab left join Suppliers c on ab.SupplierID = c.SupplierID
or
select * from Products a left join Categories b on a.CategoryID = b.CategoryID
left join Suppliers c on a.SupplierID = c.SupplierID
where b.CategoryID = 2