in MySQL what is the difference between these two command?
They work perfectly and the result is always the same:
set @numRecords = (select count(*) from config);
set @numRecords := (select count(*) from config);
Thanks Davide
in MySQL what is the difference between these two command?
They work perfectly and the result is always the same:
set @numRecords = (select count(*) from config);
set @numRecords := (select count(*) from config);
Thanks Davide
On
"=" is ambiguous and could be a comparison operator. ":=" is always interpreted as an assignment operator. This information can be found at http://dev.mysql.com/doc/refman/5.7/en/assignment-operators.html .
Quoting the MySQL 5.7 Reference Manual, section 10.4 User-Defined Variables: