Categories
SQL

Adding NOT NULL Columns. Fast.

When adding a new column and wanting to default the value for existing records, it used to be a painful task. As of SQL Server 2012 that became much easier. But nobody told me, until Simon casually mentioned it in conversation recently. I had to see it for myself, so I thought I’d share for those who […]

Categories
SQL Server

Challenges with Changing Object Schema

A few weeks back we looked at altering an object inside our database and changing the schema in which it resides. Whilst the ALTER SCHEMA … TRANSFER statement itself is straightforward, there are some gotchas you might find as a result of the change which I thought it was worth covering. To set up for what we’re going […]

Categories
SQL

Changing Object Schema in SQL Server

We’ve previously looked at the basics of using schemas in SQL Server where we created a schema and used objects inside of it. If you’re not dealing with new objects though and wanted to move something into or out of a schema how to we go about that? Not by renaming it For renaming most objects within […]