SQL Columns: UID, ID, First Name, Filename
文件名将被命名为“名字”,后跟下划线,后跟UID,后跟下划线,后跟ID。例如:
UID = 2
ID = 1
First Name = John
Filename = John_2_1.jpg
我试过了:
Update Members Set Filename='First Name'.'_'.'UID'.'_'.ID.'.jpg'
Update Members Set Filename='First Name'&'_'&'UID'&'_'&ID&'.jpg'
答案 0 :(得分:1)
使用concat
Update Members Set Filename=concat(`First Name`,'_',`UID`,'_',`ID`,'.jpg')
或
Update Members Set Filename=concat_ws('_',`First Name`,`UID`,`ID`,'.jpg')