sql - Update or Insert value if a field is NULL -
i know simple question wanted sure. have null value in field, , want change null value. change null value use insert or update?
for example: insert datatable (column 1) values (1) 'column 1' = null or
update datatable set 'column 1' = 1 'column 1' = null thank you.
you use update updates , insert inserts(new records). update incorrect since cannot compare null values = or <>. therefore have use is:
update datatable set [column 1] = 1 [column 1] null
Comments
Post a Comment