FROM Clause Flashcards

1
Q

What are the two main roles of the FROM clause?

A
  1. Indicate the tables you want to query
  2. Apply table operators like joins

SQL Server 70-461 02-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

When you select a table in the FROM clause, what should you include?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens when you omit the schema name when selecting a table in the FROM clause?

A

T–SQL uses an implicit schema name resolution process.

SQL Server 70-461 02-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why should you explicitly indicate the schema name when selecting a table in the FROM clause?

A
  1. To prevent ending up with a schema name you didn’t intend to use.
  2. To remove any cost involved in the implicit resolution process, even though it is minor.

SQL Server 70-461 02-01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are two options for assigning an alias to a table in the FROM clause and which is the best option?

A
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly