Prezados, Eu possuo um SQl do oracle que eu passo a tabela e o dono e ele me retorna as tabelas a qual ele possuir de pendencia juntamente com os joins feitos.
Gostaria de saber se alguem tem algum SQL parecido, pois ele me é muito util! Abraço! Exemplo do ORACLE: *select A.TABLE_NAME as TABELA, B.COLUMN_NAME||' = '||D.COLUMN_NAME as JOIN from ALL_CONSTRAINTS A, ALL_CONS_COLUMNS B, ALL_CONSTRAINTS C, ALL_CONS_COLUMNS D where A.OWNER = B.OWNER and A.CONSTRAINT_NAME = B.CONSTRAINT_NAME and C.OWNER = D.OWNER and C.CONSTRAINT_NAME = D.CONSTRAINT_NAME and A.CONSTRAINT_TYPE = 'P' and C.CONSTRAINT_TYPE = 'R' and A.CONSTRAINT_NAME = C.R_CONSTRAINT_NAME and A.OWNER = C.R_OWNER and B.POSITION = D.POSITION and C.TABLE_NAME = 'TABELA' and C.OWNER = 'DONO_TABELA' order by 1;*
_______________________________________________ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral