• codebyo (5/31/2011)


    Mad Myche (5/31/2011)


    The SELECT statement may be part of DML, it all depends on the context and who makes the decision. A straight Read-Only SELECT does no manipulation so it would be outside of DML. It is when the SELECT is conjoined with INSERT, INTO or UPDATE that SELECT is considered to be in DML.

    I was just pointing that DML isn't related to modification only.

    The way I see it manipulation is not same as modification.

    I've heard people believing SELECT isn't part of DML because of the "modification" word.

    Selecting data is a form of manipulating data unless I'm mistaken on the concept.

    Best regards,

    You are correct. SELECT is part of DML and it even starts its own transaction (assuming implicit transactions) just like INSERT, DELETE, UPDATE... I think the confusion arises from the common misinterpretation of the "M" as modification instead of manipulation as you pointed out, it also might stem in part from the fact that SELECT statements don't fire DML triggers.

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/