HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Deleting NULL results

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
nulldeletingresults

Problem

Currently I'm just trying to delete objects with the Name column being Null from a temp table with the following...

delete from #PulledData
where #PulledData.Name0 = NULL


I've also tried = 'NULL', = '%NULL%' etc. but nothing seems to work. I'd appreciate some help on the matter.

Solution

You need to use IS NULL.

This could be fixed another way to use the = syntax, but that option is going away soon.

Context

StackExchange Database Administrators Q#21031, answer score: 4

Revisions (0)

No revisions yet.