O'Reilly logo

SQL: Visual QuickStart Guide by Chris Fehily

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Table Aliases with AS

You can create table aliases by using AS just as you can create column aliases; see “Creating Column Aliases with AS” in Chapter 4. Table aliases:

  • Save typing

  • Reduce statement clutter

  • Exist only for the duration of a statement

  • Don’t appear in the result (unlike column aliases)

  • Don’t change the name of a table in the database

  • Also are called correlation names in the context of subqueries (see Chapter 8)

To create a table alias:

  • In a FROM clause or JOIN clause, type:
    								table [AS] alias
    							
    table is a table name, and alias is its alias name. alias is a single, unquoted word that contains only letters, digits, or underscores; don’t use spaces, punctuation, or special characters. The AS keyword is optional (Listing 7.2 and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required