Loading NULL in SQL

How do you insert/load null values from a textual table, in sql?
JCW2Asked:
Who is Participating?
 
johanntagleCommented:
http://dev.mysql.com/doc/refman/5.6/en/problems-with-null.html

You will have to reprocess your text file and replace empty fields with \N

0
 
johanntagleCommented:
Exactly what is your data source?  Anyway, in SQL:

insert into table_name (column1, column2, column3) values ('this has value',NULL,'you will notice column2 is set to null');

if you're updating an existing row and resetting a column to null:

update table_name set column2=null;
0
 
JCW2Author Commented:
What about if you're using a text file and a statement like load data infile 'C:/Users/Wild West/Desktop/SQL/Lots#6.txt' into table Lots fields terminated by ';';?
0
 
JCW2Author Commented:
Thank you for your help.
0
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.