Tabelas e views:
SELECT RDB$RELATION_NAME FROM RDB$RELATIONS;
Somente tabelas:
SELECT RDB$RELATION_NAME FROM RDB$RELATIONS WHERE RDB$VIEW_BLR IS NULL;
Somente views:
SELECT RDB$RELATION_NAME FROM RDB$RELATIONS WHERE NOT RDB$VIEW_BLR IS NULL;
Observação:
Para não incluir as tabelas e views de sistema, acrescente o filtro (RDB$SYSTEM_FLAG = 0 OR RDB$SYSTEM_FLAG IS NULL) na cláusula WHERE. Exemplo:
SELECT RDB$RELATION_NAME FROM RDB$RELATIONS WHERE RDB$VIEW_BLR IS NULL AND (RDB$SYSTEM_FLAG = 0 OR RDB$SYSTEM_FLAG IS NULL);
O conteúdo desta página pode ajudar alguém? Compartilhe!