VeeZ Phone VeeZ Phone - 1 year ago 87
MySQL Question

Assign value to variable when declared in mysql

Oracle used

operator to assign value when variable is declared in procedure.

How we can assign value to this mysql variable

declare variable varchar(20);

Answer Source

Use set keyword after declared it

Set variable=value;

Or use default

declare variable varchar(20) default value;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download