in need of SQL help

Discussion in 'OT Technology' started by Hissho, Mar 15, 2005.

  1. Hissho

    Hissho Guest

    I'm making a database with Oracle SQL*PLUS and I was wondering how to search for a specific string from a lot of tuples.

    For example: I have an attribute for names called NAME, and within that i have the tuples: John, Matt, Johnson, Windy

    If i query the string John... then i want to return John and Johnson.

    How would i go about doing this?
     
  2. WERUreo

    WERUreo Imua!

    Joined:
    Oct 15, 2003
    Messages:
    566
    Likes Received:
    0
    Location:
    Daytona Beach, Florida
    I believe if you use the keyword LIKE, you can do what you want. For example:
    Code:
    SELECT NAME FROM table WHERE string LIKE "John%";
    
    That should return John and Johnson.
     
  3. Mikey D

    Mikey D New Member

    Joined:
    Oct 13, 2002
    Messages:
    6,666
    Likes Received:
    0
    Location:
    Royal Oak, MI
    This is correct.
     

Share This Page