Outra sugestão

select 'update '||table_schema||'.'||table_name|| ' set
'||column_name||'=1' from information_schema.columns
where column_name='campox'

Tenha apenas cuidado de validar seu update com um select antes de executa-lo

Att


2013/5/27 Alessandro Lima <[email protected]>

> Que tal:
>
> SELECT table_name, column_name, data_type FROM information_schema.columns
> WHERE column_name = 'nome_do_campo' order by table_name;
>
> substituindo nome_do_campo pelo verdadeiro nome do campo, eh claro, rsrs
>
> Atenciosamente,
>
> Alessandro Lima
> email [email protected]
>
>> ** **
>>
>> _______________________________________________
>> pgbr-geral mailing list
>> [email protected]
>> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>>
>>
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a