SQL Flashcards
1
Q
Cannot use Having without:
A
Group by, because its a group level filtering criteria.
2
Q
What are the BIG 6 ELEMENTS of a sql query?
A
1) SELECT: identifies the columns.
2) FROM: identifies the table
3) WHERE: filter your results
4) GROUP BY: how to group the data.
5) HAVING: group filtering criteria
6) ORDER BY: order of the displayed results.
3
Q
Which two components of a query are absolutly essential?
A
Select and from.
4
Q
What is the USE statement?
A
You tell the query which database it should query. You can avoid having to use the USE statement if you set the default database to the one you are using.