开发者

Adding strings in mysql

Can any one help me in knowing the equivalent syntax for

SET @xx = 'data'+ CURDATE() +'.txt'` 

...in MySQL? Basically I want t开发者_运维百科o join a string and a sys function.


You have to CAST date as CHAR

SELECT CONCAT(  'data', CAST( CURDATE( ) AS CHAR ) ,  '.txt' )
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜