Oracle Database SQL — Question 138
You create a table by using this command:
CREATE TABLE rate_list (rate NUMBER(6,2));
Which two are true about executing statements? (Choose two.)
Answer options
- A. INSERT INTO rate_list VALUES (0.999) produces an error.
- B. INSERT INTO rate_list VALUES (-.9) inserts the value as -.9.
- C. INSERT INTO rate_list VALUES (87654.556) inserts the value as 87654.6.
- D. INSERT INTO rate_list VALUES (-10) produces an error.
- E. INSERT INTO rate_list VALUES (-99.99) inserts the value as 99.99.
- F. INSERT INTO rate_list VALUES (0.551) inserts the value as .55.
Correct answer: B, F
Explanation
Option B is correct because negative values can be inserted into the rate_list table without error. Option F is also correct as it rounds the value to two decimal places, inserting .55 as the result. The other options either produce errors due to constraints or do not correctly reflect the behavior of the NUMBER(6,2) datatype.