title: When to use SQL Table Alias
body: <p>I'm curious to know how people are using table aliases.  The other developers where I work always use table aliases, and always use the alias of a, b, c, etc.</p>
  
  <p>Here's an example:</p>
  
  <pre><code>SELECT a.TripNum, b.SegmentNum, b.StopNum, b.ArrivalTime
  FROM Trip a, Segment b
  WHERE a.TripNum = b.TripNum
  </code></pre>
  
  <p>I disagree with them, and think table aliases should be use more sparingly.  </p>
  
  <p>I think they should be used when including the same table twice in a query, or when the table name is very long and using a shorter name in the query will make the query easier to read.  </p>
  
  <p>I also think the alias should be a descriptive name rather than just a letter.  In the above example, if I felt I needed to use 1 letter table alias I would use t for the Trip table and s for the segment table.</p>