Skip to content

how to create trigger in db magento2

Iam running magento2 2.3.5 and i want to make trigger in db between those table which will showing in following :

enter image description here

this is a table names dropship_order

include 9 column each column will generate from different table such as

  • order_id will generate from sales_order.order_id ,
  • warehouse_id will generate from dropship_product_qty_record.warehouse_id,
  • items_id will generate from dropship_product_qty_record.product_id,
  • sub_total will generate from sales_order.subtotal,
  • carrier_name will generate from sales_order.shipping_description

so what it the best syntax can i use for this situation ?

Thank you