Scribbles about MySQL

Image frame
MySQL – INSERT SELECT Example

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 [...]



Maruf scribbled this post.
0
MySQL
Feb 14th, 2010
Image frame
MySQL- Remove Duplicate Rows

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. [...]



Maruf scribbled this post.
4
MySQL
Nov 22nd, 2009
Image frame
MySQL- Counting The Total Occurances Of A Regular Expression In A Table Column

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 [...]



Maruf scribbled this post.
0
MySQL
Jul 16th, 2009
Get a free quote