码迷,mamicode.com
首页 > 其他好文 > 详细

STRCMP(s1,s2)

时间:2017-05-23 20:34:52      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:code   字符串相同   style   logs   class   mysq   select   --   sel   

STRCMP(s1,s2) 用于比较字符串 s1 和 s2 的大小,若所有字符串相同则返回 0 ,若第一个字符串大于第二个字符串则返回 1 ,若第一个字符串小于第二个字符串则返回 -1

mysql> SELECT STRCMP(txt, txt2), STRCMP(txt, txt);
+-----------------------+----------------------+
| STRCMP(txt, txt2) | STRCMP(txt, txt) |
+-----------------------+----------------------+
|                    -1 |                    0 |
+-----------------------+----------------------+

 

 

 

    

STRCMP(s1,s2)

标签:code   字符串相同   style   logs   class   mysq   select   --   sel   

原文地址:http://www.cnblogs.com/pzk7788/p/6895739.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!