Bug #11453 | 'not' in select statement | ||
---|---|---|---|
Submitted: | 20 Jun 2005 10:57 | Modified: | 20 Jun 2005 17:13 |
Reporter: | Udo Korda | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Query Browser | Severity: | S3 (Non-critical) |
Version: | 1.1.9 | OS: | Windows (Windows XP) |
Assigned to: | CPU Architecture: | Any |
[20 Jun 2005 10:57]
Udo Korda
[20 Jun 2005 17:13]
Hartmut Holzgraefe
In MySQL versions before 5.0.2 the NOT operator has a higher precedence than '=', so your statement is evaluated as select ... where ... and ((not uistpf)='N'); and not as select ... where ... and (not (uistpf='N')); as expected. This has been changed starting with MySQL 5.0.2, see http://dev.mysql.com/doc/mysql/en/operator-precedence.html
[21 Jun 2005 7:20]
Udo Korda
i changed it to: select * from uort where uplz >'40000' and uplz<'49999' and ((not uistpf)='N'); but it is the same result.