I have a table with the following schema
CREATE TABLE `foo` (
`myfield` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
I've defined a couple of variables as follows
SET @NAME := 'Somename';
SET @AGE := '31';
I need to insert into the table an entry composed of the concatenation of these user-defined variables and constant tokens. I've tried the following query
INSERT INTO `foo` (`myfield`) VALUES
('Name: ' + @NAME + ' Age: ' + @AGE);
The statement execution succeds, but after insertion myfield
equals to:
31
It's just like the first part of the inserted value is ignored. What am I missing?