Subject | Re: [ib-support] Null |
---|---|
Author | Nando Dessena |
Post date | 2001-06-11T08:33:53Z |
Lucas,
the column is *at all* specified in the insert list; if you specify
null, an empty string, zero or whatever, the the default is not applied.
IE
insert into table1 (pk, data) values (1, null)
won't apply the default on data, whereas
insert into table1 (pk) values (1)
will.
IBO and other tools are able to pass null, empty string, zero or to
exclude the column from the insert list depending on what you tell them
to do. IBO is particularly versatile at that.
contents without worring about the null flag, so that an integer null
becomes 0 and a string null becomes ''.
HTH
--
____
_/\/ando
> If you select ALL fields of a table, do an INSERT and POST on the clientyou seem rather confused on this. The server won't apply a default if
> side there are ofcourse NO DEFAULT values since the server doesn't
> receive NULL (it will receive an empty string for chars/varchars and 0
> for integers).
> Defaults do ONLY apply when the "value" IS NULL (well in fact that's not
> a value, it's more the "absence of a value").
the column is *at all* specified in the insert list; if you specify
null, an empty string, zero or whatever, the the default is not applied.
IE
insert into table1 (pk, data) values (1, null)
won't apply the default on data, whereas
insert into table1 (pk) values (1)
will.
IBO and other tools are able to pass null, empty string, zero or to
exclude the column from the insert list depending on what you tell them
to do. IBO is particularly versatile at that.
> That clients are handling a NULL-string as '' and NULL Integers as 0 isThis is also untrue. AsString and AsInteger will just return the buffer
> just for your convenience since otherwise you would never be able to
> handle them AsString or AsInteger without asking for IsNull before.
contents without worring about the null flag, so that an integer null
becomes 0 and a string null becomes ''.
> Or can you tell me how a NULL (NIL) should be represented in an IntegerNull and nil are different beasts, please don't confuse'em.
> variable?
HTH
--
____
_/\/ando