MySQL: Select and display a variable

This entry is part 16 of 26 in the series Learn MySQL

A variable can be displayed by selecting it.

select @p := price from artist where artiste = 'New Order';
select @p;



As shown in the above example, to display the variable @p, we use

select @p;
Series Navigation<< MySQL: Using user defined variable
MySQL: Returning multiple rows of values >>

Leave a comment

Leave a Reply