Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 11 to 16 of 16 total |
GENERATED vs. COMPUTED |
Mon, Mar 19 2007 6:25 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< What confuses me here is <GenerationOptions> = ALWAYS AS <GenerateExpression>| What does it suppose to be - an equivalent of COMPUTED or something entirely different? >> The differences between GENERATED and COMPUTED have to do with when the expression is evaluated, and whether or not the result is actually stored in the table. - GENERATED columns are evaluated only during the process of an insert or update, and only if any of the columns that are referenced in the generated column are modified. COMPUTED columns are updated in real-time if any of the columns referenced in the computed column are modified. IOW, it is safe to use CURRENT_GUID or something similar in a GENERATED column, but using such a function in a COMPUTED column will cause a different value to be returned every time the computed column is re-evaluated. - GENERATED columns are stored in the table whereas COMPUTED columns are not. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Mar 19 2007 7:01 PM | Permanent Link |
Michael Baytalsky | Tim,
> The differences between GENERATED and COMPUTED have to do with when the > expression is evaluated, and whether or not the result is actually stored in > the table. Thank you, I understand now. I was just confused because in 1.00 GENERATED ALWAYS column has been treated like COMPUTED and I thought that you are replacing it with just a different syntax. Regards, Michael |
Mon, Mar 19 2007 7:16 PM | Permanent Link |
"Ole Willy Tuv" | Tim,
<< - GENERATED columns are stored in the table whereas COMPUTED columns are not. >> That's a very good design/approach IMO. Like Michael, I actually thought that GENERATED and COMPUTED were optional keywords meaning the same thing. Ole Willy Tuv |
Tue, Mar 20 2007 4:49 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< Thank you, I understand now. I was just confused because in 1.00 GENERATED ALWAYS column has been treated like COMPUTED and I thought that you are replacing it with just a different syntax. >> Nah, I just did what you asked and made GENERATED -> COMPUTED and changed GENERATED so that is was like the standard indicates it should be. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Mar 20 2007 4:51 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ole,
<< That's a very good design/approach IMO. >> I thought you would think so - it's the standard. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Mar 20 2007 5:15 PM | Permanent Link |
Michael Baytalsky | Tim,
> Nah, I just did what you asked and made GENERATED -> COMPUTED and changed > GENERATED so that is was like the standard indicates it should be. Cool, thanks! Michael |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |