|
|
su.dbms.sql- SU.DBMS.SQL ------------------------------------------------------------------ From : Bell Vladimir 2:5020/400 15 Mar 2001 12:17:54 To : All Subject : Re: MySQL, мать его... -------------------------------------------------------------------------------- "Dark Elf" <Dark.Elf@f52.n5080.z2.fidonet.org> wrote in message news:984639724@f52.n5080.z2.Fidonet.ftn... > Hello _/#*All!*#/_ > > mysql> select sname, city, comm from salespeople where comm>0.1; > > +---------+-----------+------+ > | sname | city | comm | > +---------+-----------+------+ > | Peel | London | 0.12 | > | Serres | San Jose | 0.13 | > | Motika | London | 0.11 | > | Rifkin | Barcelona | 0.15 | > | Axelrod | New York | 0.1 | > +---------+-----------+------+ > > Какого хpена последная стpочка попала в вывод? У меня не попала при comm типа double > > Еще: > > mysql> select cname, city from customers; > > +----------+----------+ > | cname | city | > +----------+----------+ > | Hoffman | London | > | Giovanni | Rome | > | Liu | San Jose | > | Grass | Berlin | > | Clemens | London | > | Cisneros | San Jose | > | Pereira | Rome | > +----------+----------+ > > mysql> select cname, city from customers where not city='San Jose'; > > Empty set (0.01 sec) > > Какого хpена? вот, что говорит об этом MySQL Reference Manual: 8<------------------------------ NOT ! Logical NOT. Returns 1 if the argument is 0, otherwise returns 0. Exception: NOT NULL returns NULL: mysql> select NOT 1; -> 0 mysql> select NOT NULL; -> NULL mysql> select ! (1+1); -> 0 mysql> select ! 1+1; -> 1 The last example returns 1 because the expression evaluates the same way as (!1)+1. <!!!!!!!!!!> 8<------------------------------- так работает : 1. select cname, city from customers where not (city='San Jose') 2. select cname, city from customers where city<>'San Jose' > > ЗЫ: Пеpепpобовал веpсии: > > mysql-3-23-28-gamma-b1 > mysql-3-23-32-p2 mysql-3.23.34, Windows2000 Vladimir Belov "MySQL Query" developer http://mysql.chat.ru --- ifmail v.2.15dev5 * Origin: Gamma NNTP server Moscow Russia (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /su.dbms.sql/7591d6b631c0.html, оценка из 5, голосов 10
|