How can I make SQL case sensitive string comparison on MySQL?

前端 未结 11 2190
温柔的废话
温柔的废话 2020-11-22 02:45

I have a function that returns five characters with mixed case. If I do a query on this string it will return the value regardless of case.

How can I make MySQL stri

11条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 03:01

    Excellent!

    I share with you, code from a function that compares passwords:

    SET pSignal =
    (SELECT DECODE(r.usignal,'YOURSTRINGKEY') FROM rsw_uds r WHERE r.uname =
    in_usdname AND r.uvige = 1);
    
    SET pSuccess =(SELECT in_usdsignal LIKE BINARY pSignal);
    
    IF pSuccess = 1 THEN
          /*Your code if match*/
    ELSE
          /*Your code if don't match*/
    
    END IF;
    

提交回复
热议问题