DeveloperMCDBA wrote: |
do you have enterprise manager or query analyzer?
DELETE FROM dbo.EventLog
FROM dbo.EventLogConfig elc
WHERE
(
SELECT COUNT(*)
FROM dbo.EventLog el
WHERE el.LogConfigID = elc.ID
and dbo.EventLog.LogTypeKey = el.LogTypeKey
and el.LogCreateDate >= dbo.EventLog.LogCreateDate
) > elc.KeepMostRecent
AND elc.KeepMostRecent<>-1 |
|
Sorry, I think, my question wasn't very clear. I have those tools, actually I haven't seen that type of delete statement before. What that delete will do? Does it delete data only from
EventLog table? What does that delete from T1 from T2 mean???