SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Embarassing Question : checking for NULL

    There a table column I need to math results when NULL exists:

    SELECT *
    FROM Mem LEFT JOIN Run on Run.fk_MID=Mem.MID
    WHERE Run.PAID='NULL'

    But how does this really go? And yes, this is embarassing to ask.
    Records having NULL for this column will not appear, for example, when they exist and when checking on

    Run.PAID<> 2
    Run.PAID!=2

    As another example:

    SELECT *
    FROM Mem, Run
    WHERE fk_MID=MID AND PAID=2 AND MID!=366

    Does return to right results, whereas this does not (returns no results):

    SELECT *
    FROM Mem, Run
    WHERE fk_MID =MID AND PAID!=2 AND MID!=366

    What could be happening?
    Last edited by datadriven; Jan 19, 2006 at 00:25.


Bookmarks

Posting Permissions

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