What is the purpose of DELETED Table in MSSQL

So far, i know that:

  1. There is a Table called DELETED in my MSSQL Database.
  2. I have not created that Table which means it already existed.

Is there a similar Table called UPDATED?

6

2 Answers

There is not a deleted table in SQL Server. There are "logical tables" (I think of them more like views, but the implementation is not important) called deleted and inserted that are available in triggers and other operations that alter data in tables.

An update trigger defines both of them.

This is pretty well explained in the documentation.

1

you can see example of using DELETED and INSERTED logical tables in the MERGE statement:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like