Web Design Blog

MySQL Functions, Tips & Tricks

This is where we store some of our Web Development thoughts, tips and tricks, just because we like to share.

MySQL – INSERT SELECT Example

I’m quickly going to demonstrate how to INSERT rows from one table into another table. I’d just like to clarify, this isn’t the same as completely copying a table, because with a INSERT SELECT query you can use the WHERE clause to INSERT rows with a particular condition (e.g. WHERE name = ‘Bill’). Whereas, copying [...]

14 Feb 2010 / 0 Comments / MySQL Functions, Tips & Tricks / by Maruf

MySQL- Remove Duplicate Rows

I’ve been working with meduim sized tables (2.1million rows) in MySQL lately. One particular table had a lot of duplicate rows, which I needed to filter out. I’m quickly going to demonstrate how I did it. I’m sure there are many ways of doing this, but this method proved to be the easiest for me. [...]

22 Nov 2009 / 5 Comments / MySQL Functions, Tips & Tricks / by Maruf

MySQL- Counting The Total Occurances Of A Regular Expression In A Table Column

Ok, so here’s the scenerio- you have a table like this in your DB: The question is: How do you count how many images there are in the images column for the entire table? From what I’m aware, you can’t do it with a standard MySQL function. So the solution? You have to create your [...]

16 Jul 2009 / 0 Comments / MySQL Functions, Tips & Tricks / by Maruf
© 2012 BrightCherry :)