Reputation: 169
I wanted to SET a value into a VARCHAR but I don't understand how to combine it.
DECLARE id INTEGER;
DECLAR action VARCHAR(100);
SET id = (SELECT MAX(ID) FROM Test.Test);
SET action = "This is a test" + id;
Somehow I am losing the textpart "This is a test". Is this normal behaviour for MySQL, am I doing something wrong ?
Upvotes: 0
Views: 41
Reputation: 26
You can use MySQL functions. SET action = CONCAT('This is a test',id);
Upvotes: 1