Subject | Re: [firebird-support] Computed column for primary key |
---|---|
Author | Thomas Steinmaurer |
Post date | 2011-06-09T06:37:06Z |
> CREATE TABLE accountsYou can't create an index on a computed column.
> (
> dept_id INT,
> build_id INT,
> account_nbr COMPUTED BY (dept_id || '-' || build_id),
> PRIMARY KEY(account_nbr)
> );
>
> It complains that I cannot use an computed column for the index. How would I fix this?
>
> Also, is using computed columns slow vs storing the actual value?
--
With regards,
Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/
Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>