Subject | Re: [ib-support] Computed Fields |
---|---|
Author | Arno Brinkman |
Post date | 2002-08-31T21:02:23Z |
Hi,
by caluse or order by clause and some more reasons. Wherever you use
FULLNAME it's every where the same format !
Think about Computed by fields on a TIMESTAMP datatype to EXTRACT YEAR,
MONTH and DAY for example.
SELECT
*
FROM
EMPLOYEE
WHERE
FULL_NAME containing 'man'
Regards,
Arno
> What should be a real life usage of COMPUTED columns?Not necessary a performance, but it could by helpfull in where clause, group
>
> In the case of some like:
> CREATE TABLE EMPLOYEE
> (FIRST_NAME VARCHAR(10) NOT NULL,
> LAST_NAME VARCHAR(15) NOT NULL,
> FULL_NAME COMPUTED BY (LAST_NAME || ', ' || FIRST_NAME));
>
> To get the full name, I'd use the expression LAST_NAME ||
> ', ' || FIRST_NAME in a SELECT clause.
>
> Is there a performance or some other kind of motivation to use COMPUTED
> columns?
by caluse or order by clause and some more reasons. Wherever you use
FULLNAME it's every where the same format !
Think about Computed by fields on a TIMESTAMP datatype to EXTRACT YEAR,
MONTH and DAY for example.
SELECT
*
FROM
EMPLOYEE
WHERE
FULL_NAME containing 'man'
Regards,
Arno