Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are the magic tables in SQL Server 2000?

Answer Posted / ajay sadyal

Hi Friends

Magic table are created when we execute the DML statement
like insert,update and delete on database..

But these magic table are not accessible directly.You can
access these table only with triggers.
Becuase these table are only in the scope of triggers.

e.g deleted and inserted are two magic table..

CREATE TRIGGER [dbo].[EMPLOYEE_trgU]
ON [dbo].[EMPLOYEE]
FOR UPDATE AS
BEGIN
declare @name varchar(40)

SELECT @name = name from deleted WTIH (NOLOCK)

-- WITH (NOLOCK) enforce the sql-server not to Lock -
-- the data if there is any transaction implemented.

-- Now Update it with another table

UPDATE tbl_employee_log
SET description = @name + ' record has been deleted
from database'


END

Hope this will help.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find query history in sql server?

875


How to get the query of a table in sql server?

849


How to find out what is the default collation in a database?

1060


which table keeps the locking information? : Sql server administration

1011


How to deploy the Report?

125


What are the disadvantages of using querystrings to send data from one page to another?

931


What is the sql profiler?

899


What is the use of commit?

954


How to get a list of columns in a view using the "sp_help" stored procedure?

988


What are “lock” hints?

998


What is use of except clause?

1036


How to insert data with null values?

970


how you can get the list of largest tables in a database? : Sql server administration

986


What are the properties of primary key?

913


What does <> symbol mean?

918