How to update 3 tables in a single statement with SQLite 3?

0

Friends I want to update only the APPROVED column of each Table. I need to set its value to TRUE only where the REVISED column (of the same row) is TRUE.

I have the following 3 tables

TABLE A:

ID   APROBADO REVISADO
1     FALSE   FALSE   
2     FALSE   TRUE 
3     FALSE   FALSE   
4     FALSE   TRUE  

TABLE B:

ID   APROBADO REVISADO
10     FALSE   FALSE   
11     FALSE   FALSE   
12     FALSE   TRUE
13     FALSE   FALSE   

TABLE C:

ID    APROBADO REVISADO
21     FALSE   FALSE   
22     FALSE   FALSE   
23     FALSE   FALSE   
24     FALSE   TRUE  

Where without more than to illustrate, in the columns APPROVED the rows that would be updated in this case would only be those that correspond to the IDs: 2 and 4 (Table A), 12 (Table B) and 24 (Table C).

Knowing that in a simple sentence it would be like this:

UPDATE TABLAx SET APROBADO = 'TRUE' WHERE REVISADO = 'TRUE';

but how would it be to update the 3 tables in the same sentence? Thanks for the help you can give.

    
asked by Edgar Itriago 09.05.2018 в 19:02
source

0 answers