2

I need to do some very specific web search, but in order to do that I need to know what's the technical name of the category/type of variables like NEW, OLD, USER ( the could be more ) that you can accessed inside a trigger in a RDBMS without having to declare them.

The question I want to post is "does <RDBMS> support <xxxx> variables in triggers ?" but I don't know what to put in the <xxxx> placeholder.

For example, variables like this :var in a query are called bind variables.

6
  • 1
    MS SQL Server calls inserted and deleted "special tables", and doesn't have a particular-to-triggers keyword for the current user. "Contextual keyword"? "Virtual table"? Commented Jul 29, 2014 at 14:31
  • There are as many valid answers as there are database engines. Commented Jun 7, 2015 at 16:13
  • I'm voting to close this question as off-topic because it is an implementation question. Commented Jun 7, 2015 at 16:14
  • @Snowman The question is a request for a technical term for an specific concept. How is that an implementation question? Commented Jun 7, 2015 at 16:35
  • @user61852 just like the accepted answer states, there are multiple types of terms based on the implementation. Sometimes they are variables, sometimes they are tables, sometimes records. The terms truly are implementation-specific. Commented Jun 7, 2015 at 16:41

1 Answer 1

3

I hope you were looking for a total lack of standardization!

PostgreSQL calls them "special variables".

IBM DB2 calls them "transitional variables".

Oracle calls them both "correlation names" and "pseudorecords".

Microsoft SQL server calls them "inserted and deleted tables".

SQLite does not appear to have a name for them.

I would suggest looking at the "CREATE TRIGGER" manual page for the databases you are interested in, and see if it supports the functionality that you're looking for. You may also need to look at the "CREATE [FUNCTION|PROCEDURE]" page, as some special variables that you're interested in (those other than NEW and OLD) may actually be among those available to all functions/procedures, and so might not appear on the trigger/procedure page.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.