I just downloaded DataGrip from JerBrains How to add new stored procedures to MySQL in DataGrip?
In toolbar navigate to View -> Tool Windows -> Database or press Alt + 1 key combination. In opened explorer expand [your database], [your schema] and routines branch. Find interesting procedure/function, than right click on it and select SQL Scripts.
"ADD" ( out c int) as begin declare a int := 5; declare b int := 6 ; c = :a + :b; end; sql.
In the Database Explorer, select a schema and navigate to File | New | Table. Alternatively, right-click the schema or database node and select New | Table.
Alt+Insert that will suggest you to generate code for different objects.Ctrl + Enter to executeDone!
It is very poor in managing stored procedures or functions in Data Grip, for Mac Users:
Shift+Cmd+F10 to open a new console where you can write a script and create a new object (SP, view, function ..etc) Also, To change or alter a Stored procedure, you can generate a SQL script for your data source, Right click on data source, then from SQL Scripts menu click Generate DDL to console
Opt+Shift+Cmd+B to generate DDL to console
Cmd+Opt+G to generate all SQL scripts for the selected datasource
Cmd+Enter to execute your script
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