I am trying to use scalar variable on a MySQL query, but can not seem to locate how to declare the scalars under MySQL:
declare @out nvarchar(3)
declare @in nvarchar(2)
select @out = 'out'
select @in = 'in'
select ID, @out as tblLocation from out_table
union all
select ID, @in as tblLocation from inc_table") or die (mysql_error());
#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 'declare @out nvarchar(3) declare @in nvarchar(2) select @out = 'out' select @' at line 1
Any help is greatly appreciated