T-SQL tool that requires a semicolon to end statements
Rather than relying on semicolons (a misplaced semicolon could also cause the problem you are describing), better to rely on transactions.

Set up your query tool to require a commit, and you will have the option rollback if necessary.

In SSMS, you can do this by checking the option SET IMPLICIT TRANSACTIONS under Tools/Options/Query Execution/SQL Server/ANSI. Or, you can turn it on with this command:

SET IMPLICIT_TRANSACTIONS ON


SET IMPLICIT_TRANSACTIONS (Transact-SQL)


  When ON, SET IMPLICIT_TRANSACTIONS sets the connection into implicit
  transaction mode. When OFF, it returns the connection to autocommit
  transaction mode.
  
  When a connection is in implicit transaction mode and the connection
  is not currently in a transaction, executing any of the following
  statements starts a transaction:
  
  ALTER TABLE FETCH REVOKE BEGIN TRANSACTION GRANT SELECT CREATE INSERT
  TRUNCATE TABLE DELETE OPEN UPDATE DROP  
  
  If the connection is already in
  an open transaction, the statements do not start a new transaction.
  
  Transactions that are automatically opened as the result of this
  setting being ON must be explicitly committed or rolled back by the
  user at the end of the transaction. Otherwise, the transaction and all
  of the data changes it contains are rolled back when the user
  disconnects. After a transaction is committed, executing one of the
  statements above starts a new transaction.