April 2007
Intermediate to advanced
1032 pages
19h 28m
English
In MySQL, we can define variables—the user variables or user-defined variables. We can assign values to user variables and use them in the same place where scalar expressions normally are used. As a result, the statement becomes partly variable. By changing the value of the user variable, the statement changes.
Before you introduce a user variable, you must define it. You do this with the special SET statement or with a SELECT statement.
After defining a variable, you must assign a value; otherwise, the variable has the null value. Again, with SET and SELECT statements, a value can be assigned explicitly to a user variable.
Section 5.6 briefly described the user variable; ...
Read now
Unlock full access