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 RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • 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