Mysql database, workbench, error, SQL format error?

Source: Internet
Author: User
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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.