Ignore duplicate entries in MySQL select using DISTINCT keyword
Sometimes every occurance of a value which may be duplicated multiple times in a result set is not needed. For example, if making a pulldown menu list of options, each option should be seen only once. The DISTINCT keyword in a select statement eliminates duplication in the result set.
Category MySQL
Save MySQL query results into a text or CSV file
MySQL provides an easy mechanism for writing the results of a select statement into a text file on the server. Using extended options of the INTO OUTFILE nomenclature, it is possible to create a comma separated value (CSV) which can be imported into a spreadsheet application such as OpenOffice or Excel or any other applciation [...]
Category MySQL
Get MySQL date in RFC-822 format for RSS feeds
To get the PubDate element of an RSS feed to validate, it needs to be in RFC-822 format. MySQL has flexible ways of working with dates and times which make this a simple task.
Category MySQL
MySQL dump import -> Error 1217
When using innodb tables and foreign key constraints, importing a mysqldump can sometimes generate foreign key errors.
Category MySQL
Solve: Can’t connect to local MySQL server through socket /tmp/mysql.sock
A frequent error message received when using the mysql command line utility is: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ While this error message can be frustrating, the solution is simple.
Category MySQL
Dropping everything from an Oracle database
If you don’t want to create your database from scratch it’s sometimes useful to just delete all the objects from it.
Category Oracle
Use regular expressions in MySQL SELECT statements
A very cool and powerful capability in MySQL and other databases is the ability to incorporate regular expression syntax when selecting data. The regular expresion support in MySQL is extensive. This recipe reviews regular expression use in MySQL and lists the supported regular expression metacharacters.
Category MySQL

