103k views
0 votes
Which FROM clause properly creates aliases?

a. from empsau=e inner join phonec=p
b. from empsau(e) inner join phonec(p)
c. from empsau as e inner join phonec as p
d. from empsau of e inner join phonec of p

User Dansays
by
7.8k points

1 Answer

1 vote

Final answer:

The correct answer is option c: from empsau as e inner join phonec as p, which properly creates aliases in SQL for the tables empsau and phonec.

Step-by-step explanation:

The correct syntax for creating aliases in SQL using the FROM clause is option c: from empsau as e inner join phonec as p. In SQL, aliases are used to give a table, or a column in a table, a temporary name. Aliases are often used to make column names more readable.

An alias only exists for the duration of the query. The keyword AS is optional when aliasing table names. Hence, both empsau AS e and empsau e are valid. However, option c is the most explicit in declaring an alias. Options a and b contain syntax errors while option d is not a valid SQL syntax for aliasing.

User Neelsg
by
7.9k points