How modify multiple database table when modify or delete user


I need some advice how I modify multiple table when modify or delete user, for example, 

When I delete user, the SQL statement as bellow,

1. update users set active='2', <multiple column> where userid=xxxx

2. delete from xxx where userid=xxxx

I use OneIM 8.1.3 and native database connector, Please help, very thanks~~