mysql类型转换之cast函数

类型转换cast()

1)数值转字符

select  cat(age  as  char)  as  ageStr  from  user;

2)  日期转数值

date:2015-11-03 15:31:26

select cast(date as signed) as  date  from   user;
posted @ 2024-11-18 14:44  活出自己范儿  Views(3)  Comments(0Edit  收藏  举报