Insert where NULL

Results 1 to 3 of 3

Thread: Insert where NULL

  1. #1
    Join Date
    Dec 1969

    Default Insert where NULL

    How do I write an insert for any value that is NULL in SQL?

  2. #2
    Join Date
    Dec 1969

    Default RE: Insert where NULL

    You can use the keyword NULL, regardless of the data type.<BR><BR>insert into t (charColumn,IntColumn) values(null,null)<BR><BR>If there is no default value defined for the column, you can just omit it from the insert statement alltogether.

  3. #3
    Brian Ellertson Guest

    Default RE: Insert where NULL

    Using TSQL (MSSQL 7) this would set all null values of &#039;field1&#039; to 0.<BR><BR>UPDATE table1 <BR>SET field1 = 0 WHERE field1 IS Null

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts