1.mysql使用date_format(date, 'format_string')数据库内置函数完成.
例如
select date_format(now(), '%d/%m/%Y') as 'date';
2.字符串连接concat(string1, string2, string3, ...)
select concat(lastName, ' ', firstName) as 'name' from user;
1.mysql使用date_format(date, 'format_string')数据库内置函数完成.
例如
select date_format(now(), '%d/%m/%Y') as 'date';
2.字符串连接concat(string1, string2, string3, ...)
select concat(lastName, ' ', firstName) as 'name' from user;