Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234»»

DML Triggers Expand / Collapse
Author
Message
Posted Wednesday, December 12, 2007 10:51 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, February 25, 2009 5:38 AM
Points: 315, Visits: 49
The question is: "how many types of DML triggers in present?" So the answer should be : 3 types of DML triggers: CLR Triggers, AFTER Triggers,INSTEAD OF Triggers.

Cheers,
Sur...


-------------------------------------------
Cheers,
Sur...
'The bend in the road is not the end of the road Unless u refuse to take the turn"
Post #432661
Posted Thursday, December 13, 2007 2:18 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, June 5, 2014 6:18 AM
Points: 1,140, Visits: 326
I'm afraid the answer is wrong .... saying that the CLR trigger isn't a DML trigger because they can also be DDL triggers is just daft

Don't know how poster will cope with quantam computing ... where qubits can be on, off or both :) does that mean a qubit isn't a bit? or it can never be on or off because it can be both?

Seems question is an attempt to 'prove' how clever poster is, and succeeds in demonstrating opposite :D
Post #432710
Posted Thursday, December 13, 2007 2:45 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:02 PM
Points: 6,132, Visits: 8,395
Hi all,

I'll have to disagree with the many objections and agree with the original question (now that is uncommon for me!). Though the explanation is confusing, misleading, and maybe even wrong, the answer is, in fact, correct.


The explanation that CLR doesn't count as a seperate category because they can also be used as DDL triggers is of course utter ****. No arguing there. However, that doesn't make it a seperate category. It's just a different language to code a trigger in. So we have two categories: AFTER triggers (which may also be defined by using the keyword FOR instead of AFTER), which can be coded in either T-SQL or in .Net, and INSTEAD OF triggers, which also can be coded in either T-SQL or in .Net.

If you want to consider CLR triggers a seperate category, fine - but then the total immediately bumps to four, because you then still have to distinguish CLR INSTEAD OF triggers from CLR AFTER triggers. There was no answer option including these two types of triggers, so it was clear that the "type" did not refer to the language.

Everyone arguing that "CLR triggers" is in itself a single type of trigger is just wrong. So there, I've said it - let the flaming commence! ;)



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #432718
Posted Thursday, December 13, 2007 6:59 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, April 16, 2009 11:50 AM
Points: 844, Visits: 12
I'll post my two cents worth.

The question asks "How many types of DML triggers in SQL are present? (DML - Data Modification Language)" - it doesn't ask "How many types of pure DML triggers in SQL are present? (DML - Data Modification Language)".

Since CLR is present in the DML language the correct answer based on the way the question is written is three.

The answer given makes a qualification that is not in the question - That is the worst kind of trick question I can imagine.
Post #432818
Posted Thursday, December 13, 2007 7:51 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:16 AM
Points: 20,860, Visits: 32,884
I don't know, but I got the answer (per QoD) correct because it makes sense to me. There are two types of DML triggers: AFTER and INSTEAD OF. These can be written in TSQL or a CLR language. Just because BOL lists CLR triggers separately doesn't mean it is correct. Please, Microsoft doesn't always know best.




Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #432849
Posted Thursday, December 13, 2007 9:15 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:02 PM
Points: 6,132, Visits: 8,395
Andrew Fitzgerald (12/13/2007)Since CLR is present in the DML language the correct answer based on the way the question is written is three.


Hi Andrew -- and everyone who has posted a similar thing.

Please explain to me why you would divide DML triggers written in T-SQL into two categories (INSTEAD OF and AFTER), while at the same time lumping all DML triggers written in CLR into a single category? If a T-SQL INSTEAD OF trigger is different from a T-SQL AFTER trigger, then how can a CLR INSTEAD OF trigger not be different from a CLR AFTER trigger?

There is no definition given for "type" in the question, so we have some leeway to create our own definitions. I can live with the answer "Two: CLR and T-SQL" (defining language as type). I can also live with the answer "Two: INSTEAD OF and AFTER" (as the question's author intended). And I'll also accept "Four: T-SQL INSTEAD OF, T-SQL AFTER, CLR INSTEAD OF, and CLR AFTER" as a legitimate answer. But three? No way!



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #432929
Posted Thursday, December 13, 2007 9:49 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, April 16, 2009 11:50 AM
Points: 844, Visits: 12
MS On-line help for SQL lists three Types of DML triggers: After, Instead of and CLR.

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/2e3f74a7-05b6-445a-8156-4aa10232c324.htm

The only one in dispute is CLR which according to the authors of the question also exists in other Features and thus is not "pure". It may be semantics but the three that MS Lists trumps the answer given in my book.

Post #432949
Posted Thursday, December 13, 2007 1:18 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:02 PM
Points: 6,132, Visits: 8,395
Andrew Fitzgerald (12/13/2007)
MS On-line help for SQL lists three Types of DML triggers: After, Instead of and CLR.


Tempted as I now am to submit a documentation bug report, I can't deny that this is indeed exactly what Books Online says. I disagree with it (but that's not new, I disagree with lots of stuff in BOL), but it is official so I guess that those who answered "three (after, instead, clr)" should be awarded a point.

And maybe the question needs to be retracted...



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #433054
Posted Monday, December 17, 2007 1:33 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, June 5, 2014 6:18 AM
Points: 1,140, Visits: 326
.... 4 surely - this included AFTER and INSTEAD OF and CLR, so we had to select this even though it also included FOR (even though this isn't really a type on its own) ...retract the question and revoke all points :)
Post #433798
Posted Friday, July 18, 2008 5:19 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Thursday, October 23, 2014 7:15 AM
Points: 1,482, Visits: 134
The answer should be 3, After, Instead Of and CLR
Post #536640
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse