INSET Command

If I have a table containing 50 fields, is there any easy command to insert a blank record with blank values or do I have to list all the field and values in the command ?
Los Angeles1Asked:
Who is Participating?
Dave FordSoftware Developer / Database AdministratorCommented:

Since you posted in the DB2 area, I'll assume you're talking about some flavor of DB2.

In that case, it's always better (much less error-prone) to list out every column into which you're inserting, but at the very least, your insert statement must list at least one value to insert. All the other columns would end up being null. (Of course, make sure they're null-capable.)

insert into deleteme (someColumn)
values ('Some Stuff')

INSERT INTO TableName (Field1Name)
Los Angeles1Author Commented:
Do I have to list all the field names, or just the first one
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.