> ---In firebird-support@yahoogroups.com, wrote :
> > Using Database Workbench I added a trigger to a table, but it didn't
> seen to do anything (in particular didn't throw an exception which it
> should have done when I deliberately created an invalid record).
>
> After restarting
08.06.2016 11:36, m.djo...@yahoo.com wrote:
>
> First I thought it's because of the results' type after the different
> operations, but even in cases when the result before ROUND is a DOUBLE
> PRECISION (according IBExpert) the round gives different results if the
> NULL in the COALESCE function
In this scenario:
CREATE DOMAIN DOM_QTY DOUBLE PRECISION;
CREATE TABLE TABLE1(ID INTEGER, QTY DOM_QTY);
INSERT INTO TABLE1 VALUES (1, NULL);
SELECT
12.5 * 0.285,
ROUND(12.5 * 0.285, 3),
COALESCE(NULL, 0.285),
COALESCE(TABLE1.QTY, 0.285),
COALESCE(NULL , 0.285) * 12.5,