varchar not null - zz12

28-Nov-07 08:23:41
Hello, just a quick novice question...how would the WHERE clause be written
to return rows that contain a value in leaving out the null rows?  Would it
be something like?:

SELECT varcharColumn1 WHERE varcharColumn1 <> NULL

Thanks in advance.
button
 
 

varchar not null - Stuart Ainsworth

01-Dec-07 07:41:44
You're looking for "IS NOT NULL"

Stu
button
 

varchar not null - Madhivanan

01-Dec-07 07:42:03
You cant compare NULL with arithmetic operators
As said use WHERE col IS NOT NULL
To find null values use WHERE col IS NULL
button
 
Trigger?