I want to create triggers in my table.I am using Data Grip as an interface to connect to my database.I googled around and the documentation said that it had something like a "Generate" drop down list which has something like function and procedures templates available for creation.But I get no such drop down list and even when I go to the new option after right clicking a table,I don't get an option for functions or procedures. I am using DataGrip 2017.1.2 and a MySQL data source.
Open Database from View -> Tool Windows or push Alt + 1 key shotcut. Now in opened explorer expand [your database] -> [your schema] -> tables -> [your table] branches and look for table triggers - elements with blue thunder icon.
As an alternative to @Andrew 's answer (since 2016.3 or .2), you can:
If nothing else, you could begin writing a CREATE TRIGGER statement and let DataGrip's code completion help you along the way.
In DataGrip, either Open Console (Ctrl+Shift+F10), or right-click your table name and choose New > Console File, to open a window where you can begin typing "CREATE TRIGGER", and go from there.
The 23.3 Using Triggers page in the MySQL manual and its 23.3.1 Trigger Syntax and Examples linked page are useful references.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With