I have a insert query that looks like this:
INSERT INTO Data1 (column1, column2)
SELECT column1, column2 FROM Data2
This query takes about 30 secs. Within that 30 secs someone might insert, delete, or modify data in Data2 table while the query is still running. How can I either prevent that or include changes within same transaction?