-
Creating optimal queries for databases
Although I’m a big PostgreSQL supporter, I started out as a MySQL user and still use MySQL daily, so I listen to the OurSQL podcast. In the latest episode (number 22) the topic was Things To Avoid With MySQL Queries. While I picked up a few tips from it (and most of the things mentioned…
-
MySQL triggers and stored procedures
So MySQL is trying to be a big boy and have advanced features like triggers and stored procedures (not just UDF’s). However their syntax seems a little complicated compared to the PostgreSQL one. So here it goes: DROP TRIGGER IF EXISTS mytrigger; DELIMITER | CREATE TRIGGER mytrigger BEFORE INSERT ON test1 FOR EACH ROW BEGIN…