Reviewing It |
1: | What is the purpose of SQL functions? |
A1: | SQL functions perform a variety of tasks such as date compares, date formatting, a host of character functions, as well as several numerical functions |
2: | What is the DUAL table useful for? |
A2: | The DUAL table contains one column and one row and is useful when wanting to run a function once |
3: | Explain SQL concatenation. |
A3: | Concatenation is when two or more columns are merged together, many times merged with some text items, to form a single column of outout |
4: | The DECODE statement is what? |
A4: | The DECODE function is the IF-THEN-ELSE logic to SQL |
5: | When might you use the HAVING clause? |
A5: | to limit the rows returned from a GROUP BY clause |
6: | Briefly describe what a JOIN is. |
A6: | A join is when two or more tables are required to be used in the same SQL statement |
7: | What is 'qualification' and why is it important to a self-join? |
A7: | A self-join is where you are joining the same table to itself and you will need to qualify the columns in the where clause so Oracle knows which table a column belongs to |
8: | Name the four types of sub-queries. |
A8: | those that return a single row; those that return multiple rows; those that return multiple columns in a single row; and those that return multiple columns in multiple rows |
9: | What is an IN-LINE view? |
A9: | Oracle9i supports a subquery in the FROM clause. This type of SQL statement is also known as an 'INLINE View.' |
Checking It |
1: | SQL functions falls into
|
A1: | 2: single-row functions and multiple-row functions |
2: | A single-row function can only return one row. True/False |
A2: | True |
3: | In a DATE mask, the RR means
|
A3: | b |
4: | When might a group function return more than one row?
|
A4: | c |
5: | Cartesian Joins have a valid use. True/False |
A5: | False, usually occurs when the WHERE clause is accidentally left off of a join condition |
6: | Oracle9i supports a subquery in the FROM clause. True/False |
A6: | True |
7: | SQL*Plus can
|
A7: | d |
8: | SQL*Plus can be used to create GUI reports. True/False |
A8: | False, Character mode only. |
Applying It |
Independent Exercise 1:
Independent Exercise 2:
Independent Exercise 3:
18.224.54.255