Advertisement
Baxram97

Foo hh1 (sql)

Nov 26th, 2023
1,786
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.24 KB | None | 0 0
  1. SELECT
  2.     P.ProductName,
  3.     ISNULL(C.CategoryName, 'Без категории') AS CategoryName
  4. FROM
  5.     Products P
  6. LEFT JOIN
  7.     ProductCategory PC ON P.ProductID = PC.ProductID
  8. LEFT JOIN
  9.     Categories C ON PC.CategoryID = C.CategoryID;
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement