What I think is a Synonym

  • Hello Everyone

    I am trying to troubleshoot some issues and I have ran across this "Alias", mostly in a couple triggers.

    Using a basic Insert statement for example

    INSERT INTO TableA

    (Col1,Col2Col3)

    SELECT

    Col1,Col2Col3 FROM BogusTableName

    When I hover the mouse pointer over the bogus name, in a tooltip, it will show an actual table that does exist.

    I am not seeing a Synonym of this name, or any alias of this name any where. There are a couple hundred sprocs and triggers that are using this odd name. Where can I find any or all of the aliases in the database? I do not have any synonyms listed in this database.

    Thanks in advance for your help

    Andrew SQLDBA

  • Let me take a wild guess Inserted and Deleted are the table names. These are always available within triggers (and other code in SQL 2005 onwards) and allow you to get to the version of the row before the update (Deleted) and after the update has taken place (Inserted).

    Trigger type --> Table(s) available.

    Insert -> Inserted

    Delete -> Deleted

    UPdate -> Inserted and Deleted

    Fitz

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply