Scripts

Technical Article

Truncate tables with foreign keys

Truncating tables with constraints always had been a pain, since we have to drop and recreate all the FKs. I created a script that takes care of dropping and recreating the foreign keys while truncating. Please use with caution! and always respect your Data !

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(3)

You rated this post out of 5. Change rating

2016-12-01 (first published: )

1,422 reads

Technical Article

Generate add / alter script for missing / different type columns

This query generate add/alter script for missing or different columns. Execute on source database and copy resultset. Execute generated script on any database (may be all customer databases) Missing columns will be created and different types will change as source schema.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(4)

You rated this post out of 5. Change rating

2016-11-18 (first published: )

939 reads

Blogs

Flyway Tips: More Object History

By

I wrote about Flyway Desktop Object History in a previous tip. This feature has...

Why Ai Agents need an eval framework

By

AgentDBA (the database agent I have been building) has more than 1000 automated tests,...

A New Word: Semaphorism

By

semaphorism – n. a conversational hint that you have something personal to say on...

Read the latest Blogs

Forums

Server-level Roles

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Server-level Roles

Pay for Performance

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Pay for Performance

Tracking Inserted, Updated, and Deleted Rows with SQL Server OUTPUT

By Imran2629

Comments posted to this topic are about the item Tracking Inserted, Updated, and Deleted...

Visit the forum

Question of the Day

Server-level Roles

In SQL Server 2025, can I alter a fixed server role?

See possible answers