Magic Tables ?
Answers were Sorted based on User's Feedback
Answer / punit chauhan
whenever a trigger is fire in response to an insert, delete and update statement.
Two special tables create, these are the inserted and deleted tables, they are also referred as magic tables.
* whenever we insert any record into the table then trigger use inserted table.
* whenever we delete any record into the table then trigger use deleted table.
* whenever we update any record into the table then trigger use inserted and deleted tables.
| Is This Answer Correct ? | 16 Yes | 0 No |
Answer / rani
Refer this link which nicely demonstrates the Magic Table.
Magic Table are the INSERTED and DELETED tables which we
cannot see from the database, but can be accessed using
Triggers.
When a new row is added an INSERTED table gets created with
the inserted row. Similarly when a row is updated a DELETED
table is created with the deleted row. For update the old
data is moved to the DELETED table and the new updated row
gets created in the INSERTED table.
| Is This Answer Correct ? | 4 Yes | 3 No |
What is database architecture? : SQL Server Architecture
How to delete duplicate rows?
There is a table1 with records (1,2,3,4,5,6) and table2 with records (4,5,6,7,8,9).write a query so as to get the result as 1,2,3,4,5,6,7,8,9
What is the server name in sql server?
what is datawarehouse?
What is the definition for sql server 2000?
Explain nested stored procedure. Syntax and an example for create nested stored procedure?
hi. suppose one person goal is strong knowledge on SQL.... suggest me ...if he learns SQL SERVER or ORACLE? which is best?
7 Answers Google, TCS, Unisys,
What are indexes? When do you need to create Indexes?
4 Answers CarrizalSoft Technologies, HP,
How to find the date and time of last updated table?
what stored procedure would you use to view lock information? : Sql server administration
How to get nth highest salary from employee table.
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)