Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Códigos SQL #
/*CREATE MATERIALIZED VIEW log_todos_clientes ON */
/* VIEW MATERIALIZADA PARA REPLICAR TODOS OS CLIENTES NA MATRIZ */
CREATE MATERIALIZED VIEW todos_clientes AS
BUILD IMMEDIATE
REFRESH COMPLETE
ON COMMIT AS
select * from clientes
UNION
select * from sinonimo_clientes_recife
UNION
select * from sinonimo_clientes_natal;
/* VIEW MATERIALIZADA PARA REPLICAR TODOS OS CLIENTES DA MATRIZ PARA RECIFE */
CREATE MATERIALIZED VIEW todos_clientes AS
BUILD IMMEDIATE
REFRESH COMPLETE
ON COMMIT AS
SELECT * from matriz.todos_clientes@link_matriz;
/* VIEW PARA CONSULTAR TODOS OS CLIENTES */
CREATE OR REPLACE view v_todos_clientes AS
select * from matriz.todos_clientes@link_matriz;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment