Link to home
Start Free TrialLog in
Avatar of JCW2
JCW2

asked on

Loading NULL in SQL

How do you insert/load null values from a textual table, in sql?
Avatar of johanntagle
johanntagle
Flag of Philippines image

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;
Avatar of JCW2
JCW2

ASKER

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 ';';?
ASKER CERTIFIED SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JCW2

ASKER

Thank you for your help.