Hi,

1=1 => true

“where true” is always true
this is oposite to 1=0 => false

and this statements are equal:
update stock set actualizar = 0 where 1=1;
update stock set actualizar = 0;

regards,
Karol Bieniaszewski




From: mailto:firebird-support@yahoogroups.com 
Sent: Thursday, May 5, 2016 9:55 PM
To: firebird-support@yahoogroups.com 
Subject: Re: [firebird-support] update all records

  

Hello, 


I don't understand your SQL :
"Where 1=1"   first "1" is a field name ?


if "Where actualizar=1" it may works ?
The condition is on records, and must use fields values...no ?


If you don't use condition, all records should be updated to the same value 0...


"Update stock set actualizar=0"  should update all records with actualizar =0 
to whole stock table... 


With best regards,
Mikey



Le Jeudi 5 mai 2016 19h19, "kristinwens...@yahoo.com [firebird-support]" 
<firebird-support@yahoogroups.com> a écrit :




  
Thanks



On Wednesday, May 4, 2016 6:45 PM, "shg_siste...@yahoo.com.ar 
[firebird-support]" <firebird-support@yahoogroups.com> wrote:




  
hello! I've been googling but found nothing about it.


Why this sentence does not update all the records in the table? (FB 2.5)


update stock set actualizar = 0 where 1=1



Thanks!!


Sergio








  • [firebird-supp... shg_siste...@yahoo.com.ar [firebird-support]
    • Re: [fire... kristinwens...@yahoo.com [firebird-support]
      • Re: [... Michel LE CLEZIO mlcvi...@yahoo.fr [firebird-support]
        • R... liviusliv...@poczta.onet.pl [firebird-support]
    • Re: [fire... liviusliv...@poczta.onet.pl [firebird-support]
      • Re: [... Ann Harrison aharri...@ibphoenix.com [firebird-support]
    • Re: Re: [... liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
      • Re: R... Ann Harrison aharri...@ibphoenix.com [firebird-support]

Reply via email to