• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Transact-SQL > Links with JOIN

Links with JOIN

If you want to generate results columns for two or more tables simultaneously, you must link them. To create a join, use the INNER JOIN, LEFT JOIN, RIGHT JOIN, and other variants on the JOIN command. The different JOIN variants are described in Chapter 7, “Views.”

You can, for example, use INNER JOIN to combine records from two tables as soon as corresponding values are determined for the ON condition in both tables. The following example determines all the film titles and the calendar weeks in which the films are shown:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint