MySQL tutorials
Import CSV file directly into MySQL
contributed by katy8439 on May 8, 2007 under MySQLInstead of writing a script to pull in information from a CSV file, you can link MYSQL directly to it and upload the information using the following SQL syntax.
MySQL: Increment an exisitng value
contributed by qmchenry on February 24, 2007 under MySQLThis slick MySQL syntax allows you to increment or decrement an existing number in a table without first having to read the value. This is a nice way to increment an access counter.
MySQL: Use CONCAT to include text in SELECT results
contributed by qmchenry on January 31, 2007 under MySQLThe CONCAT function in MySQL allows SELECT statements to act like printf commands by mingling text and query results together.
Copy an existing MySQL table to a new table
contributed by qmchenry on July 4, 2006 under MySQLThis is a great set of two commands that allow the creation and population of a new table with the structure and data of an existing table. This provides a quick means of making a point-in-time copy of a table and is a safe, easy way to make a quick copy of a table for testing an application in development on live data without risking a production environment.
Rename or change name of MySQL table
contributed by qmchenry on under MySQLIf you change your mind and want to rename an existing MySQL table, with or without data in it, it is no problem. One simple command will change the table’s name.
Ignore duplicate entries in MySQL select using DISTINCT keyword
contributed by qmchenry on July 3, 2006 under MySQLSometimes 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.
Save MySQL query results into a text or CSV file
contributed by qmchenry on June 28, 2006 under MySQLMySQL 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 which accepts data in CSV format.
RECENT POPULAR RECIPES
- Solve: Can't connect to local MySQL server through socket /tmp/mysql.sock
- Add a column to an existing MySQL table
- Create a MySQL user account
- Drop or delete a table in MySQL
- Create a MySQL table with a primary key
- Change the MySQL Root User Password
- Display a list of databases on a MySQL server
- Save MySQL query results into a text or CSV file
- View our Top Tens
TECH-RECIPES BLOGS
- Symfony Propel 1.4: New Project Workflow
- quickie: video on adding 3G modem to a Thinkpad Tablet
- modding: adding 3G to my Lenovo Thinkpad Tablet
- quick look: Lenovo Thinkpad Tablet (Honeycomb) and Pen (pics)
- design: my geek lair
- How to Delete Your Twitter Account
- Flash Error May Slow Down OS X Lion
- Mass Effect: Cannot See Mouse Pointer





