• One technique I use to try to avoid deletes or updates when highlighting only a portion of a query is to use table aliases and always include a FROM clause (even though not required). This way if I only highlight the top line it will fail because SQL Server can't find the aliased table.

    For example:

    delete tbl

    FROM tablename tbl

    WHERE UserID = 1

    I am going to have to look into using begin tran. I'm sure this will help me avoid some of the mistakes I make.

    Robert Marda

    Robert W. Marda
    Billing and OSS Specialist - SQL Programmer
    MCL Systems