How to declare a variable in MySQL?
There are mainly three types of variables in MySQL: User-defined variables (prefixed with @):You can access any user-defined variable without declaring it or initializing it. If you refer to a variable that has not been initialized, it has a value of NULL and a type of string.SELECT @var_any_var_name You can initialize a variable using SET or SELECT statement:SET @start = 1, @finish = … Read more