Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    10

    Unanswered: How to use wild card with not equal statement

    Hello,
    I'm trying to rune a query with a not equal and a wild card. I know that the '%' sign is used when using the like function.
    This is what I'm trying to do.
    SELECT * FROM table WHERE field <> 'BOB%';

    Is there anyway of using a wildcard with the not equal?

  2. #2
    Join Date
    Mar 2004
    Location
    Sydney
    Posts
    20
    Yes

    PHP Code:
    SQLselect from people;

            
    ID NAME
    ---------- ----------
             
    1 BOB
             2 SUE
             3 JOHN
             4 JENNY

    SQL

    SQLselect from people where name not like 'J%';

            
    ID NAME
    ---------- ----------
             
    1 BOB
             2 SUE 

Posting Permissions

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