-
TRUNCATE and
other DDL operations
+
TRUNCATE and
DDL operations
are not published.
Examples
- Create a simple publication that just publishes all DML for tables in it:
+ Create a publication that publishes all changes in two tables:
-CREATE PUBLICATION mypublication;
+CREATE PUBLICATION mypublication FOR TABLE users, departments;
- Create an insert-only publication:
+ Create a publication that publishes all changes in all tables:
-CREATE PUBLICATION insert_only WITH (NOPUBLISH UPDATE, NOPUBLISH DELETE);
+CREATE PUBLICATION alltables FOR ALL TABLES;
+
+
+
+ Create a publication that only publishes INSERT
+ operations in one table:
+CREATE PUBLICATION insert_only FOR TABLE mydata
+ WITH (NOPUBLISH UPDATE, NOPUBLISH DELETE);