External Article

Scripting Database Objects using SMO

With the introduction of SQL Server 2005, Microsoft has created a new .NET management API for SQL Server called SQL Management Objects (SMO). As I started working with SQL Server in earnest following its release I discovered a few limitations that I hoped to correct using SMO. This article describes those problems and how to use SMO to script database objects.

SQLServerCentral Article

SQLExaminer Review

Have you ever needed to figure out which objects in development need to go to production? Ever wondered about how to get your databases back in synch? SQL Server guru David Poole takes a look at SQL Examiner, a product that he feel works well for him and is looking to purchase. Read about David's impressions and see if this is for you.

External Article

Database Geek of the Week - Scott Forsyth

After interviewing a number of database geeks, it struck me that many of them focus on one area of database development. Hilary Cotter specializes in replication, for example, while Itzik Ben-Gan focuses on Transact-SQL (see http://www.simple-talk.com/categories/sql-articles). Scott Forsyth is no different, but his area of expertise is more unusual: web hosting using .NET technology.

Blogs

Learning from Mistakes: T-SQL Tuesday #194

By

We’re a week late, once again my fault. I was still coming out of...

Stupid Things I Did With AI: ASCII Art

By

I ran across this article recently (https://www.gatesnotes.com/meet-bill/source-code/reader/microsoft-original-source-code) and it has a great opening piece...

Simple Talks Podcasting in 2026

By

I’m in the UK today, having arrived this morning in London. Hopefully, by this...

Read the latest Blogs

Forums

Learning From Breakage

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Learning From Breakage

Python in Action to Auto-Generate an Optimized PostgreSQL Index Strategy

By sabyda

Comments posted to this topic are about the item Python in Action to Auto-Generate...

Adding and Dropping Columns I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Adding and Dropping Columns I

Visit the forum

Question of the Day

Adding and Dropping Columns I

I have this table in my SQL Server 2022 database:

CREATE TABLE [dbo].[CityList]
(
[CityNameID] [int] NOT NULL IDENTITY(1, 1),
[CityName] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
I decide to add two new columns for the StateProvince and Country. What code should I use?

See possible answers