On Tue, Dec 17, 2002 at 03:51:03PM +0000, James Gregory wrote:
> If it is going to work, the way to do it will be to not specify that
> field at all in your list of fields to insert into. It's supposed to
> operate like a default value essentially. If you specify something else
> it will use that. both NULL and the empty string are "something".

If I'm not completely mistaken, NULL is as close to nothing
that you're going to get.  The SQL standard doesn't really
allow missing values -- if you leave a value out of an insert
statement you will get NULL values, a user specified default,
or an error.

What this means for MySQL  ... I dunno.

Also FWIW, putting things like CURRENT_TIME in tables is 
fairly brittle -- think of what happens at daylight saving
time or when the time on your pc goes haywire. Bad things
happen to your data.

What you're usually after is a "guaranteed to be greater"
value.  With postgresql/oracle you'd use nextval().

http://www.au.postgresql.org/docs/faq-english.html#4.15.3

Again, I'm a little ignorant of mysql.  Does it have this?

Matt
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to