INSET Command

Posted on 2011-10-28
Last Modified: 2013-12-10
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 ?
Question by:Los Angeles1
    LVL 33

    Expert Comment

    INSERT INTO TableName (Field1Name)

    Author Comment

    by:Los Angeles1
    Do I have to list all the field names, or just the first one
    LVL 18

    Accepted Solution


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


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Suggested Solutions

    November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
    Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now