You must Sign In to post a response.
  • Category: SQL Server

    Recent interview question

    I was asked Suppose there is table A in DB,Suppose when we update that table,whose are two tables(Magic tables) that are updated other than table A?
  • #430358
    INSERTED , DELETED are the magic tables, when you update a row in Table A, old row will sent DELETED and new updated row will be inserted in the INSERTED table

    Note: these tables are only available in Triggers of table.

    HTH

    Regards,
    Satish

  • #430359
    Hi,

    When Ever Update table Statement Fires SQL server mantains the original row before updation in a deleted table and New (updated)row in a Inserted Table.


    hope that will give you an idea

  • #430422
    - "INSERTED" and "DELETED" tables are called Magic tables of the
    SQL Server.
    - These tables are not visible in the data base.But,these
    tables are accessible using "TRIGGER"

    Whenever Insert command is called on the table, "Inserted" table is created.
    Currently Inserted row will be available in that table

    Whenever Delete command is called the on the table, "DELETED" table is created.
    Currently deleted row will be available in that table.

  • #435661
    INSERTED , DELETED are the magic tables in SQL server.


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.