Home >Database >Mysql Tutorial >mysql数据库,workbench,报错,sql格式错误?

mysql数据库,workbench,报错,sql格式错误?

WBOY
WBOYOriginal
2016-06-06 09:44:361175browse

mysqlworkbenchsql建数据库

建立数据库是卡住了
代码如下,最后三行的前面出来红色的×。
请问,什么问题?
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;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn