Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL String Question

Author  Topic 

richy
Starting Member

3 Posts

Posted - 2003-04-28 : 10:23:48
How do I select all records from my database where the integer field is a null. If I do

SELECT * FROM database WHERE usernum="" I get an obvious error as the "" is only for strings.

I've tried typing in NULL as well but that comes up with an error as well.

Any help would be greatly appreciated.

Visit the Football Predictions League
http://www.ukfpl.com

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2003-04-28 : 10:30:14
SELECT * FROM database WHERE usernum IS Null

also, be careful saying "select from database" -- you select from TABLES that live IN a database ... important distinction!

- Jeff
Go to Top of Page
   

- Advertisement -