开发者

Adding strings in mysql

开发者 https://www.devze.com 2023-03-18 07:12 出处:网络
Can any one help me in knowingthe 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

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

精彩评论

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