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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -