Archive for 'Database'

[How-to] dump out MySQL Functions, Stored Procedures & Triggers

Scenario: When working with MySQL Functions, Stored Procedures and Triggers, it is very important to know how to export those custom items out from MySQL. Default mysqldump command will not export out Functions, Stored Procedures or Triggers. So, additional parameters is required. Below is the mysqldump example: (more…)

[How-to] MySQL function example.

Scenario: Guys, this is a simple tutorial on how to create a MySQL function. For example, I need a MySQL function that will take in 2 integer input parameters and return a tinyint value to user. (more…)

Export mysql select statement into csv

Today I would like to share some useful command for developer to export out data by using SQL statement. I think most of the developer should familiar with the putty & command line environment. But always facing an problem to export out the data in a excel/csv file in order to send it to customer. […]

MySQL release free disk space.

When perform some data clean up in MySQL, found that no disk space was release and MySQL still occupied it. Here is the command to check those tables with more than 300MB of data: (more…)

PHP call oracle store procedure

For PHP, it is not a difficult task to connect to Oracle database. But recently, I am working on a project that require me to execute the oracle store procedure with pass in some input & retrieve the output. It should be pretty easy, just I never try it before. So I write a simple […]