Home > Database > Mysql Tutorial > MySQL的CONVERT()

MySQL的CONVERT()

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:19:53
Original
4708 people have browsed it

CONVERT()提供一个在不同字符集之间转换数据的方法。语法是: CONVERT(expr USING transcoding_name) 在 MySQL中,转换代码名与相应的字符集名相同。 例子: SELECT CONVERT(_latin1'Mller' USING utf8); INSERT INTO utf8table (utf8column) SELECT CONVERT

   CONVERT()提供一个在不同字符集之间转换数据的方法。语法是:

  CONVERT(expr USING transcoding_name)

  在 MySQL中,,转换代码名与相应的字符集名相同。

  例子:

  SELECT CONVERT(_latin1'Müller' USING utf8);

  INSERT INTO utf8table (utf8column)

  SELECT CONVERT(latin1field USING utf8) FROM latin1table;

  CONVERT(... USING ...)根据标准SQL规范实施。

  在传统SQL模式中,如果你转换一个“0”日期字符串到日期类型,CONVERT()函数返回NULL。在MySQL5.1中还产生一条警告。

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template