SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,761
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    What if there is no Field Value in a SELECT?

    What happens if I run a query like this...
    Code MySQL:
    SELECT activation_code
    FROM member
    WHERE email = 'bob@mail.com'

    ...and there is a Bob record with said "e-mail", however the "activation_code" is NULL?

    Do I get a record back?


    Debbie

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,495
    Mentioned
    161 Post(s)
    Tagged
    4 Thread(s)
    Yes.

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,220
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    What happens if I run a query like this...
    not to be overly critical, but why can't you test stuff like this yourself?

    no, seriously... testing stuff yourself is the best way to learn

    and it's usually faster than waiting hours and hours for your free help desk to respond
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,761
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937 View Post
    not to be overly critical, but why can't you test stuff like this yourself?
    I did test it, and I feel uncertain as to what is going on...


    no, seriously... testing stuff yourself is the best way to learn

    and it's usually faster than waiting hours and hours for your free help desk to respond
    See above.


    Debbie


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
  •