In the last episode (Mar 02), wang shuming said:
> Hi,
> 
>   Any table with a ordno char(n)  not null  field
> 
> for example
> 
> ordno     qty
>              35
>                0
>                1
> 'abc'         3
> '000'     100
> 
> select * from table1 where ordno>'   ' or ordno='   '
> > 5 rows
> 
>  select * from table1 where ordno>='   '
>  > 2 rows

I cannot reproduce this, with either mysql 5.1.35 or 5.5.1-m2:

mysql> create table table1 (ordno char(3) not null);
Query OK, 0 rows affected (0.00 sec)

mysql> insert into table1 values ('   '),('   '),('   '),('000'),('abc');
Query OK, 5 rows affected (0.00 sec)
Records: 5  Duplicates: 0  Warnings: 0

mysql> select * from table1 where ordno>='   ';
+-------+
| ordno |
+-------+
|       |
|       |
|       |
| 000   |
| abc   |
+-------+
5 rows in set (0.00 sec)

mysql> select * from table1 where ordno>'   ' or ordno='   ';
+-------+
| ordno |
+-------+
|       |
|       |
|       |
| 000   |
| abc   |
+-------+
5 rows in set (0.00 sec)

mysql>

-- 
        Dan Nelson
        dnel...@allantgroup.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to