| ||
1. | Which of these will sort records in a query?
|
|
2. | What will the statement SELECT * FROM CUSTOMER find?
|
|
3. | Which of these statements can be used to make changes to data in a database?
|
|
4. | How many tables will this query retrieve records from? SELECT * FROM TABLE1 CROSS JOIN INNER JOIN TABLE2 USING (ID1) CROSS JOIN TABLE3 LEFT OUTER JOIN TABLE4 USING (ID2);
|
|
Answers
1. | Exercise 1 solution e. ORDER BY . The ORDER BY clause is added to the end of a query SELECT statement to re-sort records after the WHERE and GROUP BY clauses have been applied to the selected records. |
2. | Exercise 2 solution e. All records and all fields in the CUSTOMER table. The * (asterisk or star character) means that all fields are retrieved from a table. The lack of a WHERE clause filter or a GROUP BY clause summary means that all records are retrieved. In other words, all the data contents of the entire table are retrieved. |
3. | Exercise 3 solution f. All but b. Answer f is correct because b is a query that retrieves data from a database. The UPDATE statement changes records in a table. The CREATE TABLE statement creates a new table. The ALTER TABLE changes an existing table. The INSERT statement adds records to a table. |
4. | Exercise 4 solution d. 4. Answer d is correct because there are three JOIN clauses and four tables shown in the query. |
| ||