Declare Variables in one line in MySQL Stored Procedure

Software Used:

PHPMyAdmin

Known:

I declare 3 variables like this one:

DECLARE tmp TEXT;
DECLARE tmp1 TEXT;
DECLARE tmp2 TEXT;

Wanted:

I want to declare several variables in one line

Question:

How to do this … ?

Answer:

You can do it with this code below:

DECLARE tmp, tmp1, tmp2 TEXT;

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *