# TiDB Online `DDL`

__*Online DDL*__

+ **`ALTER TABLE ... ADD/DROP/MODIFY COLUMN {column_name} [{options}]`** 
+ `DML` does not block `DDL` from other sessions
+ It is recommended that the client should handle exceptions: `ERROR 8028 (HY000)`
  + "... Information schema is changed during the execution of the statement ..."
+ Monitor and cancel actions
  + **`ADMIN SHOW DDL`** 
  + **`ADMIN SHOW DDL JOBS`**  
  + **`ADMIN SHOW DDL JOB QUERIES {job_id}`**  
  + **`ADMIN CANCEL DDL JOBS {job_id}`** 
+ DDLs are online and non-blocking, for example:
```
ALTER TABLE test.target_table ~!@ADD@!~ COLUMN name CHAR(30);
ALTER TABLE test.target_table ~!@MODIFY@!~ COLUMN name CHAR(40);
ALTER TABLE test.target_table ~!@DROP@!~ COLUMN name;
```
------------------------------------------------------------

Class demo scripts:

https://github.com/pingcap/tidb-course-201-lab/blob/master/scripts/07-demo-online-ddl-add-column-01-workload-before.sh

https://github.com/pingcap/tidb-course-201-lab/blob/master/scripts/07-demo-online-ddl-add-column-02-workload-after.sh



Since DML operations do not block DDL operations from other sessions, when a DML in a transaction encounters a table schema change, you can choose to abandon the transaction or re-commit it.
