Truncate a base table in a view

I am currently in a situation where we are creating a facade database, which basically consists of a set of views, which are just a selection from a table with the same name in another database. The idea is that the application can be redirected to the facade database with minimal changes to the actual code.

It seems to work fine for insert, update, delete, and obviously select. Unfortunately, some of the stored procedures use TRUNCATE TABLE in places. It is very limited, and our plan right now is to simply replace this code with a call to the "TRUNCATE" stored procedure, which will actually handle truncating the table behind the scenes. Before continuing, I would like to see if there are any other suggestions on how to handle this.

Thanks for any suggestions or tips!

+3
source share
1 answer

( ) - , TRUNCATE TABLE (Transact-SQL) , . , ( ) TRUNCATE DELETE, DELETE, . , - DELETE , . , , .

+5

Source: https://habr.com/ru/post/1746872/


All Articles