What are Magic Table?
Answers were Sorted based on User's Feedback
Answer / anilkumar,bijapur
The magic table is when we "INSERT" a table values that
values stored into table it's one magic
and another magic is "DELETE" when we DELETE the values in
a table the compiler delete the values whatever you are
stored
@)INSERT
@)DELETE
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / manish kumar
Magic tables are created when data is inserted or updated
in the normal tables. They get deleted when the commit is
done. They are used for the auditing purposes.
They are useful in keeping track of the insertion and
updation on the database.
| Is This Answer Correct ? | 7 Yes | 3 No |
Answer / puneet sharma
INSERTED and DELETED tables known as MAGIC
TABLES.BECAUSE IN BOTH THE CASES TRIGGER FIRES AND
TEMPORARILLY STORE INSERTED AND DELETED VALUES
RESPECTIVELLY.
| Is This Answer Correct ? | 5 Yes | 1 No |
Whenever a trigger is fired in response to the
INSERT,DELETE,Or UPDATE statement the SQL SERVER creates
two temporary tables, Called Magic Table. The Magic Table
called inserted or deleted. The magic table conceptual
tables are similar in structure to the table on which thw
trigger is difined.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / danish aleem
An implicit trigger is fired when ever we insert, update or delete, then the two temporary tables are created i.e.insert and delete. So these temporary tables are termed as MAGIC TABLES.
* These are named as MAGIC because they are removed automatically when the specified query is committed.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sharda prasad shukla
MAGIC TABLES NOTHING BUT INSERTED AND DELETED WHICH ARE
TEMPORARY OBJECTS CREATED BY SERVER INTERNALLY TO HOLD
RECENTLY INSERTED VALUES IN THE CASE OF INSERT,TO HOLD
RECENTLY DELETED VALUES IN THE CASE OF DELETE,TO HOLD
BEFORE UPDATING VALUES OR AFTER UPDATING VALUES IN THE CASE
OF UPDATE.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / johnny
Magic? I'm still waiting for the rabbit to appear...
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / digvijay kumar singh
Magic table is Temporary type table. it is created when
trigger perform the insert,delete and update action. trigger
have two type magic table:-
1:- inserted table.
2:- deleted table.
when trigger perform the insert and update action on table
then trigger used the Inserted magic table and deleted magic
table used at deletion time.
i hope you will understand..................
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sabahuddin
Usually Inserted and Deleted Tables are called Magic Tables.Magic Tables does not contain the information about
the Columns of the DataType text,ntext or image.These are maintained by SQL Server for internal processing whenver an update,insert,Delete occur on table.However we can refer these tables in Triggers.
Whenever an updated table statement is fired SQL Server Maintains the original row before updation in a deleted table and New(Updated) row in inserted table.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sabahuddin
Usually Inserted and Deleted Tables are called Magic Tables.Magic Tables does not contain the information about
the Columns of the DataType text,ntext or image.These are maintained by SQL Server for internal processing whenver an update,insert,Delete occur on table.However we can refer these tables in Triggers.
Whenever an updated table statement is fired SQL Server Maintains the original row before updation in a deleted table and New(Updated) row in inserted table.
| Is This Answer Correct ? | 1 Yes | 0 No |
What is tempdb in sql server?
what is the query and condition to delete datas in sql server.
What is global temp table?
How do I start and stop sql server?
You have several tables, and they are joined together for querying. The tables contain both clustered indexes and non clustered indexes to optimize performance, how should you distribute the tables and their indexes onto different file groups?
can any one say how to update the following senario I have a table <srabank> in which the table structure is as follows ANAME ACCNO LOCATION ACCTYPE BAL SBanuPrakash 31518746291 Punganur deposit 4000 Sreenivas 31518746292 mahoobnagar current 14000 Ranjith 31518746293 Karimnagar Savings 2000 Giresh 31518746294 Chennai deposit 40000 Boo 31518746295 Chennai Savings 20000 Jay 31518746296 Valachari Savings 1000 tirumalraj 31518746297 Vellore Savings 8000 The senario is We need to select one account number and check the balance after checking the balance if the balance exist we need to transfer to another account . in the from account the amount need to be reduced and in the to account the amount needed to be added. for example for the <accountno> <31518746291> the balance is <4000> for the <accno> <31518746292> the balance is <14000> after transferring the balance the details will look as follows <accno><31518746291> <bal> <2000> <accno><31518746292> <bal> <16000> the above mentioned two statment will come under the final result.
What gets stored inside msdb database?
What are the properties of primary key?
What are the advantages dts has over bcp?
Tell about MOM Tool(Microsoft Operator Manager)?
How many tables can be joined in SQL Server?
How do you troubleshoot errors in a SQL Server Agent Job?
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)