I am getting error when I do following, I need your help to resolve this error or better way to handle. Any help is greatly appreciated.
SET @SourceDatabase := 'XYZ';
SET @DestinationDatabase := 'ABC';
INSERT INTO @DestinationDatabase + '.' + `Table1`
Error:-
Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@DestinationDatabase + '.' +ABC
at line 1 0.000 sec