[thelist] Insert Nothing

Scott Dexter dexilalolai at yahoo.com
Mon Sep 27 14:23:19 CDT 2004


> >
> > 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())
> 

Hey Rob--

>From the schema above, you can't insert "nothing" as such, since both
columns require a value (by the "not null" part). If you're after
inserting defaults without having to specify values, you can do:

INSERT INTO myTable DEFAULT VALUES

Hope this helps,
sgd


More information about the thelist mailing list