SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make case sensitive string compare in MySql query ?

    Hello all ,

    i'm using MySql version 5.0.9

    I want to compare with case sensitive in the query ,

    my password has to be case sensitive , so i want to compare with case sensitive . does anyone have idea how to compare with case sensitive ?

    STRCMP() function not support case sensitive ?

    here is my procedure :

    DROP PROCEDURE IF EXISTS `cms`.`sp_Login`$$
    CREATE PROCEDURE `sp_Login`(
    p_account_id varchar(32),
    p_password varchar(16))
    begin

    select 1 from t_account a where a.account_id = p_account_id and
    a.password = p_password)
    end


    thanks


    Ron

  2. #2
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BINARY operator.

    Code:
    select 1 from t_account a where a.account_id = p_account_id and BINARY
    a.password = p_password)


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
  •