![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Mon, Mar 19 2007 8:53 AM | Permanent Link |
"Ole Willy Tuv" | create table test
( col1 integer generated by default as identity not null, col2 varchar(30) default 'Value' not null ); insert into test values (null,null); select * from test What happens here is that the null values are silently converted to the default column values. This behavior seems inconsistent, one would expect the insert statement to throw a constraint violation error when assigning null to not nullable columns. A better approach would IMO be to support/use the <default specification> to explicitly specify default values: insert into test values (default,default); Ole Willy Tuv |
Mon, Mar 19 2007 6:27 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Ole,
<< What happens here is that the null values are silently converted to the default column values. This behavior seems inconsistent, one would expect the insert statement to throw a constraint violation error when assigning null to not nullable columns. >> It's a sequencing issue due to what you mention below. For now, the expectation is in line with DBISAM in that any column with a default value assigned won't raise a constraint error on an insert. << A better approach would IMO be to support/use the <default specification> to explicitly specify default values: >> I've got this on the list of enhancements. I missed it in the initial run-through. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, June 22, 2024 at 05:51 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |