首页 > 代码库 > CONVERT(... USING ...)

CONVERT(... USING ...)

CONVERT(... USING ...) 用于改变字符串的默认字符集

mysql> SELECT CHARSET(abc);    # 默认是utf8字符集+----------------+| CHARSET(abc) |+----------------+| utf8           |+----------------+mysql> SELECT CHARSET(CONVERT(abc USING latin1));    # 转换成latin1字符集+--------------------------------------+| CHARSET(CONVERT(abc USING latin1)) |+--------------------------------------+| latin1                               |+--------------------------------------+

 

 

 

 

    

CONVERT(... USING ...)