SQL Server Script to replicate recent inserted data to subscriber and to remove same data from publisher I want to replicate newly added data from publisher DB to subscriber DB.
When newly added data is replicated in subscriber dB the same data will be removed from publisher DB.
How to do this?
You can use a Temporal Table at the subscriber for this, although you need to use some custom initialization scripts to preserve the history table at the subscriber.
Then insert at the publisher and delete whenever you want.  Both the insert and delete will be replicated to the subscriber, and the history table will have the data after it's deleted from the main subscriber table.