Archive for the ‘MySQL’ Category

Relational Deletes in MySql and Foreign Keys

Managing relational tables in a database is a topic that all developer will eventually bump into. There are quite a few ways of managing relational data, and the best solution sometimes can be hard to find. As a developer you have to look at the scope of the application, the types of tools you have on hand, and where you want the responsibility for the referential integrity to reside. The most often used ways of maintaining referential integrity are as follows:

Read more »

Replacing a Range of Fields in MySQL

Replace a range of values in a single MySQL column with the following query:

Update [Table_Name]

Set [Column_Name] =  replace([Column_Name], ‘[String to Replace]‘,’[New String]‘)

Where id Between [someNumber] and [anotherNumber]