title: How to make sure all sql statements are executed else roolback
body: <p>I have few SQL statements.</p>
  <pre><code>copy into STG_PB(VAR,FILE_NAME, LINE_NUMBER) 
    from (
        select $1,metadata$filename, metadata$file_row_number
        from @investor_stage_s3// 
  )
  
  delete from stg_pb1
  insert into stg_pb1 values (....)
  </code></pre>
  <p>So daily I get loads of data from s3 to be loaded into the database.
  In my SQL statement, I am using a delete statement, therefore if I get any error in the insert statement, all my previous data will be lost. How DO I make sure, if an error occurs roll back to previous data?</p>
  <p>Thanks,
  Xi</p>