Advertisement
Guest User

Untitled

a guest
May 25th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Zestaw 3
  2.  
  3. 2.A
  4. sposób 1:
  5.  
  6. use Northwind
  7. SELECT *, ShippedDate from [Order Details] od
  8. join Orders o on o.OrderID = od.OrderID
  9.  
  10. sposób 2:
  11.  
  12. use Northwind
  13. SELECT *, (SELECT ShippedDate from Orders where
  14. OrderID = [Order Details].OrderID) from [Order Details]
  15.  
  16. 2.B
  17.  
  18. use Northwind
  19. SELECT OD.* from [Order Details] od join Orders o
  20. on o.OrderID = od.OrderID where YEAR(OrderDate)=1997
  21.  
  22.  
  23. 2.C
  24.  
  25. use Northwind
  26. SELECT od.*, CompanyName from Orders o
  27. join Customers c on c.CustomerID = o.CustomerID
  28. join [Order Details] od ON o.OrderID = od.OrderID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement