SQL Set the value to NULL

Hi Experts,

If I want to manually set "MTDS2" to null, can you help me to correct my query?

Update [mmd_feed].[dbo].[Reporttable_OffersNewwithdatename] set MTDS2 ISNULL
where step = 'Unresponded Deal'

Thank you!
Who is Participating?
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Update [mmd_feed].[dbo].[Reporttable_OffersNewwithdatename] 
set MTDS2 = NULL
where step = 'Unresponded Deal'

Open in new window

Lee SavidgeCommented:
Jim is correct.

To add:

Setting a value to null is done by:

set MTDS2 = null

Checking for null is done by:

where MTDS2 is null

isnull() is a function and is used like this:

select isnull(MTDS2, 0) from myTable

Basically, isnull() replaces null with the second value when you use it like the above.
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.