数据库查询,修改日期 数字格式

改为年-月-日输出
select DATE_FORMAT(brokerage_date,'%Y-%m-%d') as brokerageDate from table1

改为年-月-日 时:分:秒输出
select date_format(pay_end_time,'%Y-%m-%d  %H:%i:%s') from table1

四舍五入到小数点第二位
select ROUND(amount,2) from table1

不要四舍五入,到小数点第二位
select TRUNCATE(amount,2) from table1

猜你喜欢

转载自blog.csdn.net/howard789/article/details/81305092