Bug #38651 | 'View's SELECT contains a variable or parameter', 'unknow field' | ||
---|---|---|---|
Submitted: | 8 Aug 2008 2:17 | Modified: | 8 Aug 2008 5:23 |
Reporter: | Daniel Penza | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Views | Severity: | S3 (Non-critical) |
Version: | 5.0.51a | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | create view |
[8 Aug 2008 2:17]
Daniel Penza
[8 Aug 2008 4:28]
Valeriy Kravchuk
Bug #38649 was marked as a duplicate of this one.
[8 Aug 2008 5:23]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php According to http://dev.mysql.com/doc/refman/5.0/en/create-view.html: " A view definition is subject to the following restrictions: ... The SELECT statement cannot refer to system or user variables. " According to http://dev.mysql.com/doc/refman/5.0/en/select.html: "A select_expr can be given an alias using AS alias_name. The alias is used as the expression's column name and can be used in GROUP BY, ORDER BY, or HAVING clauses.", but there is no word alias can be used anywhere else.