You could probably even do this, assuming none of the fields in the table have a "NOT NULL" constraint:
INSERT INTO
myTable
(
field1
)
VALUES
(
NULL
)
I dunno how much SQL you know so I may be saying the obvious to you, but just in case, you can just do one field and all the rest should default to
NULL. If there are any required fields, then you have to have those in your insert statement, and assign some value to them. If it's autoincrement you need not worry about including it in your statement.
weifoon
Member
505 Points
101 Posts
insert sql
Oct 03, 2003 09:15 AM|LINK
tmorton
All-Star
56327 Points
9683 Posts
ASPInsiders
Moderator
Re: insert sql
Oct 14, 2003 08:13 PM|LINK
ASP.NET/IIS.NET Website Manager, Neudesic
Cutter
Member
225 Points
45 Posts
Re: insert sql
Oct 20, 2003 07:00 AM|LINK
INSERT INTO myTable ( field1 ) VALUES ( NULL )I dunno how much SQL you know so I may be saying the obvious to you, but just in case, you can just do one field and all the rest should default to NULL. If there are any required fields, then you have to have those in your insert statement, and assign some value to them. If it's autoincrement you need not worry about including it in your statement.