FROM Clause Flashcards
What are the two main roles of the FROM clause?
- Indicate the tables you want to query
- Apply table operators like joins
SQL Server 70-461 02-01
When you select a table in the FROM clause, what should you include?
Include both the name of the table and the instance it belongs to. For example, HR.Employees instead of just the table name Employees.
SQL Server 70-461 02-01
What happens when you omit the schema name when selecting a table in the FROM clause?
T–SQL uses an implicit schema name resolution process.
SQL Server 70-461 02-01
Why should you explicitly indicate the schema name when selecting a table in the FROM clause?
- To prevent ending up with a schema name you didn’t intend to use.
- To remove any cost involved in the implicit resolution process, even though it is minor.
SQL Server 70-461 02-01
What are two options for assigning an alias to a table in the FROM clause and which is the best option?
1. table_name alias_name 2. table_name AS alias_name
The second option is more readable, so it is the preferred method.
SQL Server 70-461 02-01