Bug #77777 | Documentation Clarification | ||
---|---|---|---|
Submitted: | 18 Jul 2015 22:51 | Modified: | 20 Jul 2015 19:16 |
Reporter: | Gordon Linoff | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | All Versions | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | documentation, variables |
[18 Jul 2015 22:51]
Gordon Linoff
[20 Jul 2015 11:57]
MySQL Verification Team
Hello Gordon, Thank you for the report. Assignment operator ":=" can be used in any valid SQL statement (not just in SET statements) to assign a value to a variable. This has been explained in the relevant section of manual page https://dev.mysql.com/doc/refman/5.6/en/assignment-operators.html Thanks, Umesh
[20 Jul 2015 19:16]
Gordon Linoff
Umesh . . . You are missing the point. Of course `:=` can be used to assign a variable. The point is that it is an expression that assigns a value. So: select (@x := (@y := 1)) is perfectly legal. The documentation should clarify this.