Results 1 to 3 of 3

Thread: [RESOLVED] a simple query problem regarding NULL value

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Resolved [RESOLVED] a simple query problem regarding NULL value

    Hi All,
    i started some practice on SQL server 2000. i have a table called "student". its fields are sno,sname .unfortunately this table is containing NULL values. now i would like to delete the rows whose sno=NULL. so i wrote the query like this.... DELETE STUDENT WHERE SNO= NULL

    but this statement is not helpful to delete the rows. could you suggest me a way to solve it?

    Thanks & Regards,
    raghunadhs

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: a simple query problem regarding NULL value

    In TSQL, to check if a value equals Null you need to use

    Where SNO Is Null

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    167

    Re: a simple query problem regarding NULL value

    Thanks brucevde,
    it is working...
    regards,
    raghunadhs

    Quote Originally Posted by brucevde
    In TSQL, to check if a value equals Null you need to use

    Where SNO Is Null

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width