Databases Reference
In-Depth Information
of the entire table. A
DELETE
statement retains the disk space in the table for future inserts or updates, but a
TRUNCATE
statement frees the disk space for other tables or database objects.
9.
The new
MERGE
statement combines the functionality of which two other DML statements?
Answer:
MERGE
combines the functionality of
INSERT
and
UPDATE
.
10.
What function does the
DESCRIBE
command perform in SQL*Plus or iSQL*Plus?
Answer:
command displays the structure of a table, including the column name, datatype,
and whether the column is a required field.
The
DESCRIBE
Chapter 3
1.
What is another way to write the following SQL statement by using another function?
select empno || lpad(initcap(ename),
40-length(empno),'.')
"Employee Directory" from emp;
Answer:
You can rewrite the statement using the
CONCAT
function:
select concat(empno, lpad(initcap(ename),
40-length(empno),'.') "Employee Directory" from emp;
2.
Which function would you use to perform an explicit conversion from a number to a string?
Answer:
You can use the
TO_CHAR
function to convert a number to a string.
3.
How can you rewrite the function call
NUMTOYMINTERVAL(17,
'year')
using the function
TO_YMINTERVAL
?
Answer:
You can rewrite the function call as
TO_YMINTERVAL('17-00')
.
4.
What is the result of a number added to a
value?
Answer: The result of a number added to a NULL is NULL.
NULL
5.
What is the result of formatting the number -232.6 using the format mask '9999.99S'?
Answer: The resulting format is 232.60-.
6.
Rank the following operators or conditionals based on priority, from highest to lowest: *, OR, ||, >=
Answer: *, ||, >=, OR
7.
The DUAL table has how many rows and how many columns?
Answer: The DUAL table has one row and one column. The column is named DUMMY and has a value of 'X'.
8.
True or false: Strings and numbers can be concatenated.
Answer: True, before the number is concatenated with the string, it is implicitly converted to a string.
Search WWH ::




Custom Search