Given the following definition of a table:
CREATE TABLE trans
( trans_id INTEGER NOT NULL
, unit_price DECIMAL(10, 2)
, qnty INTEGER
, t_time TIMESTAMP(6) NOT NULL)
PRIMARY INDEX (trans_id);
The table has a row that was inserted as follows:
INSERT trans VALUES
(45912, 12.99, NULL, CURRENT_TIMESTAMP);
The following statement is submitted:
SELECT COALESCE(unit_price, 0)*qnty
FROM trans WHERE trans_id=45912 AND unit_price IS NOT NULL;
What is the result?
- NULL
- 0.00
- 12.99
- no rows returned
Reveal Solution
Next Question