The SELECT statement in SQL SELECT is handed over to the server for execution, so the null check must be in the correct syntax for your database server. If you are using SQL Server, then rani.batra's script should work (don't forget the SQL in front of th SELECT), although I would do away with the backquotes. If you are using another DBMS, then the syntax may vary.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein