Null Value Statement

Posted by Sam on Stack Overflow See other posts from Stack Overflow or by Sam
Published on 2010-12-28T19:22:48Z Indexed on 2010/12/28 19:53 UTC
Read the original article Hit count: 205

Filed under:
|
|
|

Hi All,

I have created a table called table1 and it has 4 columns named Name,ID,Description and Date.

I have created them like Name varchar(50) null, ID int null,Description varchar(50) null, Date datetime null

I have inserted a record into the table1 having ID and Description values. So Now my table1 looks like this:

Name   ID   Description  Date

Null    1    First       Null

One of them asked me to modify the table such a way that The columns Name and Date should have Null values instead of Text Null. I don't know what is the difference between those

I mean can anyone explain me the difference between these select statements:

SELECT * FROM TABLE1 WHERE NAME IS NULL

SELECT * FROM TABLE1 WHERE NAME = 'NULL'

SELECT * FROM TABLE1 WHERE NAME = ' '

Can anyone explain me?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server