• ok.

    1) Some times i gain performance because of the GO in the meadle of the staments.

    I don't know why....

    Suppose the two querys mencionated befour.

    Why does the GO (bacth breaker) brings more perfomance to que execution of the querys?

    2) In the cenario below:

    Insert into table1 values (x,y,z)

    Update table1 set columnX=y where columnX=z

    Note - No explicit "Begin transaction" on the beginning of the querys.

    If the first query fails and the second executes well, will the second query be automatically committed to the database? even if the first one as failed (and therefour not been committed to the database)?

    3) you told me that the @@error function only verifies the instruction befour it.

    So , in that case, only one transaction would be rolledback, in case of error.

    what about if i do the query like this:

    begin transaction

    Insert into table1 values (x,y,z)

    Update table1 set columnX=y where columnX=z

    commit transation

    In this case, if one of the two queries fail? will the other be committed to the database? for instance , suppose query one executes well, but query two fails.

    Would query one be committed to the database?

    Tks for your help,

    Pedro