The database creation is stuck with the following code, and the last three lines are marked in red. What is the problem? Beginifnew. item_type_id & lt; & gt; old. item_type_idornew.measure_type_id & lt; & gt; old. measure_type_idornew.per_quantity & lt; & gt; old. per_quantityornew.total_weight & lt; & gt; old. total_weightornew.unit_price & mysqlworkbenchsql database creation
Database creation is stuck
The code is as follows. the last three lines show the red ×.
What is the problem?
Begin
If new. item_type_id <> old. item_type_id
Or new. measure_type_id <> old. measure_type_id
Or new. per_quantity <> old. per_quantity
Or new. total_weight <> old. total_weight
Or new. unit_price <> old. unit_price
Or new. enabled_flag <> old. enabled_flag then
Insert into mtl_item_price_his
Set item_id = old. item_id
, Change_date = now ()
, Unit_price = old. unit_price
, Item_type_id = old. item_type_id
, Measure_type_id = old. measure_type_id
, Per_quantity = old. per_quantity
, Total_weight = old. total_weight
, Description = old. description
, Creation_date = now ()
, Created_by = old. last_updated_by;
END if;
End;