SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Mar 2006
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mysql, all letters "small"

    I want to ask this.
    I want to make a query with a where statement for a field with varchar values.
    Code:
    select * from mytable where myfield like '%post%'
    How can I convert post and myfield records all to small (AoA to aoa) or capital (AoA to AOA) letters to this query so fetch all results?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,340
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    mysql string comparisons are case-insensitive -- see http://dev.mysql.com/doc/refman/5.1/...nsitivity.html

    however, you might want to use the UPPER() and LOWER() functions
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •