Re: how to set a DEFAULT value !!
- From: greg@xxxxxxxxxxxx (Greg Sabino Mullane)
- Date: Thu, 27 Apr 2006 22:39:19 -0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This is definitely the behavior of MySQL, PostgreSQL, and Oracle,
and I'm pretty sure most others follow it as well.
Whoa. Be careful what you say about Oracle.
Oracle does have default values for table columns, defined
by the DEFAULT clause in CREATE/ALTER TABLE.
However, the _only_ way to get a column set to the default value
is to leave the column out of the INSERT statement altogether.
There is nothing you can put in a VALUES(..) list which
will do the trick, nor is there anything that can be bound to
a placeholder which will result in the default being set.
You sure about that? You might want to check your docs, or
update to a newer version of Oracle. If I recall correctly,
this ability was added in 9i.
- --
Greg Sabino Mullane greg@xxxxxxxxxxxx
PGP Key: 0x14964AC8 200604271837
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFEUUfrvJuQZxSWSsgRAt/YAKDvcFCDz41zVERWPb3OuI5Bmg3k1QCgyYmt
Z6Id4DtXS519enpBJWN214U=
=/wPB
-----END PGP SIGNATURE-----
.
- Follow-Ups:
- Re: how to set a DEFAULT value !!
- From: Charles Jardine
- Re: how to set a DEFAULT value !!
- References:
- Re: how to set a DEFAULT value !!
- From: Charles Jardine
- Re: how to set a DEFAULT value !!
- Prev by Date: Checking if a table exist
- Next by Date: dbi.perl.org isn't working all that great
- Previous by thread: Re: how to set a DEFAULT value !!
- Next by thread: Re: how to set a DEFAULT value !!
- Index(es):
Relevant Pages
|