[thelist] Insert Nothing

Chris Johnston fuzzylizard at gmail.com
Mon Sep 27 14:11:58 CDT 2004

On Mon, 27 Sep 2004 13:10:10 -0500, Rob Smith <rob.smith at thermon.com> wrote:
> Hi list,
> I want to insert nothing into an SQL Server table.
> INSERT INTO myTable () VALUES ()
> My table structure is this:
> caid            int             4               not null
> auto_increment
> timevisited     datetime        8               not null        (getdate())
> How can I achieve this?

In short, you can't. If a column is defined as NOT NULL, then in order
to insert a record, you must insert a value into those columns. There
is no way around this except to declare the columns as allowing null.

chris johnston


"For millions of years, mankind lived just like the animals and
something happened which unleashed the power of our imagination, we
learned to talk."
Pink Floyd

More information about the thelist mailing list