```
create trigger trig1
    -> after insert on student
    -> for each row
    -> when (new.name="rgb")
    -> begin
    -> insert into class ("ug1",1)
    -> end;

```

it tells me that something is wrong near when statement. Can you help me in finding it out?

```
desc class;
+---------+-------------+------+-----+---------+-------+
| Field   | Type        | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| name    | varchar(40) | YES  |     | NULL    |       |
| section | int(11)     | YES  |     | NULL    |       |
+---------+-------------+------+-----+---------+-------+
2 rows in set (0.06 sec)

mysql> desc student;
+-------+-------------+------+-----+---------+-------+
| Field | Type        | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| roll  | int(11)     | YES  |     | NULL    |       |
| name  | varchar(40) | YES  |     | NULL    |       |
+-------+-------------+------+-----+---------+-------+

```

these are the descriptions for both the tables.