Guest User

Untitled

a guest
Nov 21st, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Table1 (id, country, name, ccy)
  2. Table2 (sId, price)
  3.  
  4. SELECT
  5. RTRIM(id) as id,
  6. country
  7. FROM
  8. dbo.Table1
  9. LEFT OUTER JOIN
  10. dbo.Table2 ON Table1.Id = Table2.sId
  11.  
  12. MNKD US UnitedStates
  13. 928502811 UnitedStates
  14.  
  15. 928502811 UnitedStates
  16. MNKD US UnitedStates
  17.  
  18. select trim(id) as id, country
  19. from dbo.Table1 left outer join
  20. dbo.Table2
  21. on Table1.Id = Table2.sId
  22. order by id;
  23.  
  24. SELECT
  25. RTRIM(id) as id,
  26. country
  27. from dbo.Table1
  28. left outer join dbo.Table2 on Table1.Id = Table2.sId
  29. ORDER BY id
Add Comment
Please, Sign In to add comment