Dim TableOrig= "tblChemicals" , TableNew="tblChemicalsNew" As String
SQL1.BeginTransaction
'DELETE TABLE IF IT EXISTS
txt="DROP TABLE IF EXISTS " & TableNew
SQL1.ExecNonQuery(txt)
'CREATE NEW TABLE WITH FEWER COLUMNS FROM ORIGINAL TABLE
txt="CREATE TABLE IF NOT EXISTS " & TableNew & " AS SELECT Code, Chemical, Price, Unit " _
& "FROM " & TableOrig
SQL1.ExecNonQuery(txt)
'DELETE ORIGINAL TABLE IF IT EXISTS
txt="DROP TABLE IF EXISTS " & TableOrig
SQL1.ExecNonQuery(txt)
'RENAME NEW TABLE TO ORIGINAL TABLE NAME
txt= "ALTER TABLE " & TableNew & " RENAME TO " & TableOrig
SQL1.ExecNonQuery(txt)
SQL1.TransactionSuccessful
SQL1.EndTransaction