Home > Database > Mysql Tutorial > MySql小点心―3、Locale_MySQL

MySql小点心―3、Locale_MySQL

WBOY
Release: 2016-06-01 13:41:16
Original
1313 people have browsed it

bitsCN.com
MySql小点心—3、Locale 相关链接:MySql小点心—1、赋值操作符"="与":="http:///database/201208/149469.html;MySql小点心—2、常用的比较函数和比较操作符http:///database/201208/149471.html Locale对编程的再熟悉不过了,通过不同的语言环境来选择对应的资源。
MySql里面对于日期有提供Locale的支持。 Mysql中使用lc_time_names 这个系统变量来设置Locale。 输入下面代码就可以查看当前的Locale:[sql] SELECT @@lc_time_names;  一般默认是en_US    所以默认情况下输入下面语句 [sql] SELECT DAYNAME('2012-08-22')  会返回 Wednesday我们可以通过  [sql] SET lc_time_names=zh_CN  
 来将它设置为中文简体,这样在输入查询时就是:

MySql小点心―3、Locale_MySQL
  bitsCN.com

Related labels:
3
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template