Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of creating trigger by phpmyadmin

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the method of phpmyadmin to create triggers, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Type the phpmyadmin address in the browser, type the administrator user name and password, and go to the phpmyadmin management page.

After entering, select the database where the operands are located. Click [SQL] directly from the menu in the database overview, and type the code to create the trigger. Click [execute].

After the creation is completed, click the data table corresponding to the trigger condition in the trigger to view its [structure]. Click [details] at the bottom of the structure.

Pull to the bottom of the interface, and the trigger you just created is in the bottom right corner. Can be edited or deleted again. Triggers can create more than one, but not with the same name. It is common to write the duplicate name in the trigger and undo the creation.

After clicking the edit button, modify the trigger. Take a look at the syntax of the trigger:

Create trigger {before | after} {insert | update | delete} on for each row

The story is all in it.

Create trigger: create a new trigger and specify the name of the trigger.

{before | after}: used to specify whether to trigger before or after the execution of an insert, update, or delete statement.

On: used to specify the table name that responds to the trigger.

For each row: the execution interval of the trigger. For each row tells the trigger to perform an action every other row, rather than once on the entire table.

The SQL statement to be executed by the trigger, and if the trigger wants to execute multiple SQL statements, put multiple statements in the begin. In the end block.

The creation is complete!

Thank you for reading this article carefully. I hope the article "how to create triggers in phpmyadmin" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 205

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report