Month: February 2009

Changing collation

Once, I was in a situation where I had to change the collation of a database. This is not an easy task, since collations are defined at three levels: Database, Table and Columns. So even, if you change the database collation, all the table and fields will still retain the original collation. Changing collation in […]

Continue reading

Disabling triggers and constraints

Recently, I was in a situation where I had to move data from an old version of a database to a newer version of the same database. The structure of the database had changed slightly. I was trying to figure out what data to move first. I wanted to move data that was referenced before […]

Continue reading

Multiple Nulls in a column with a UNIQUE constraint

I came accross a situation where I needed to temporarily insert multiple rows in a table with a Null value in a column with a UNIQUE constraint on it. In other words, I wanted the values in that column to be unique, except when they are Null. According to ANSI SQL specifications, this should be […]

Continue reading