Insert Statement

  • Thanks all of you guys. helping me..

    this conversation really helpfull for me

    Thanks........

  • Darn it. Late to the game.

    Everything Matt said.

    😀

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Another consideration on using Output clauses is that they work on update and delete as well.

    With delete, you can't scan the table for the rows you just deleted, for relatively obvious reasons.

    With update, if you scan the table for columns you just updated, you can also end up with rows you didn't update, if they happen to match the scanning criteria. Output only gets the ones actually affected by the current update command.

    So, if you end up using Output for those actions, it would be a point of standards and consistency to also use it for insert.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply