Reviewing It |
1: | What is Oracle's main character-mode interface? |
A1: | SQL*Plus |
2: | What is the syntax of the CHANGE command to change text in the SQL buffer? |
A2: | C/<source string>/<new string> |
3: | The DESCRIBE command is useful for what? |
A3: | Displaying Object column names and attributes |
4: | What will the command SELECT * FROM EMP do? |
A4: | This will show all the rows in the table EMP |
5: | In the table EMP, give the ORDER BY clause that will return the rows in the order of DEPTNO ascending and within DEPTNO, SAL descending. |
A5: | ORDER BY DEPTNO, SAL desc |
6: | What is the difference between a NULL and a 0 field? |
A6: | NULL contains no value at all |
7: | When using substitution characters (say in an INSERT statement), what is the difference between & and &&? |
A7: | & prompts the user for a value with each execution of the SQL statement, && only prompts the user to provide a value on the first SQL statement |
8: | What is the difference between the DELETE command and the TRUNCATE command? |
A8: | DELETE can selectively delete rows and this command can be undone with a ROLLBACK statement. The TRUNCATE drops all the rows, no selectivity, and the command cannot be reversed |
9: | Tablespaces are used for what? |
A9: | Tablespaces are storage areas in Oracle, much like a directory structure of a computer. Tablespaces have physical disk drives assigned |
10: | Show the syntax to create an index on ename for the table EMP. |
A10: | CREATE INDEX <some name> ON EMP (ENAME) |
11: | What is an EXTENT? |
A11: | One or more Oracle datablocks assigned in a contiguous manor to a particular object. |
Checking It |
1: | SQL*Plus can:
|
A1: | d |
2: | In the SQL Buffer, the command I is short for INSERT. True/False |
A2: | False (stands for INPUT) |
3: | The default behavior of the ORDER BY clause is ascending. True/False |
A3: | True |
4: | Which of the following LIKE commands will return the rows with a name like HOTKA
|
A4: | b |
5: | Which is the valid UPDATE statement?
|
A5: | a |
6: | Which of the following is NOT a valid data type:
|
A6: | d |
7: | CREATE TABLE <table name> AS SELECT can create a duplicate object. True/False |
A7: | True, the rows and columns depends on the SELECT statement |
8: | You change your mind on a DROP COLUMN command and return the column to the original object. True/False |
A8: | False, DROP COLUMN is unrecoverable |
9: | Selecting which field causes a SEQUENCE generator to increment?
|
A9: | b |
10: | Constraints are useful for:
|
A10: | d. |
Applying It |
Independent Exercise 1:
Independent Exercise 2:
Dept 10, SMITH, SYSDATE, 10000
Dept 10, JONES, SYSDATE, 20000
Dept 20, KING, SYSDATE, 15000
Dept 20, JONES, SYSDATE, 18000
Dept 20, FOUNTAIN, SYSDATE, 12000
Independent Exercise 3:
Independent Exercise 4:
NOTE
The next chapter uses this PEOPLE table for its Exercise examples as well.
18.227.46.69