| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Rocio Gomez Escribano | Date: | April 26 2011 1:34pm |
| Subject: | RE: empty set | ||
| View as plain text | |||
Thank you so much!! It works!! mysql> SELECT COUNT(*) usuarios,codigo FROM usuarios WHERE codigo = 45; +----------+--------+ | usuarios | codigo | +----------+--------+ | 0 | NULL | +----------+--------+ 1 row in set (0.00 sec) -----Mensaje original----- De: João Cândido de Souza Neto [mailto:joao@stripped] Enviado el: martes, 26 de abril de 2011 15:02 Para: mysql@stripped Asunto: Re: empty set As far as I know, it isn´t possible. The right way is to check how many rows your select has returned. -- João Cândido de Souza Neto ""Rocio Gomez Escribano"" <r.gomez@stripped> escreveu na mensagem news:000601cc03e2$fd3c9540$f7b5bfc0$@gomez@ style="color:#666">stripped... > Hi! I'm not sure it would be possible what I want to. > > > > I have a huge query, most of them are independent, and they could have not > answer. What I want is when this happen, I want to change the "empty set" > by > "void" or "0" or something like that, here it is an example: > > > > mysql> select * from usuarios; > +-----------+--------+ > | usuarioID | codigo | > +-----------+--------+ > | 1 | 456 | > | 2 | 789 | > | 3 | 123 | > +-----------+--------+ > 3 rows in set (0.00 sec) > > > > mysql> SELECT usuarioID FROM usuarios WHERE codigo = 45; > Empty set (0.00 sec) > > > > > > +-----------+ > | usuarioID | > +-----------+ > | Void | > +-----------+ > > > > Is it possible??? > > > > Thank you!! > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=1
| Thread | ||
|---|---|---|
| • empty set | Rocio Gomez Escribano | 26 Apr |
| • Re: empty set | joao | 26 Apr |
| • RE: empty set | Rocio Gomez Escribano | 26 Apr |
