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' )
精彩评论