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,376 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: )

913 reads

Blogs

AI in SQL Server vs PostgreSQL: Vector Search, Embeddings, and RAG Compared

By

Both SQL Server and PostgreSQL are moving fast into AI territory — and if...

Monday Monitor Tips: AI Alert Analysis

By

We keep adding new AI capabilities to Redgate Monitor, where it makes sense. Check...

From SQL Saturday to Day of Data

By

A behind-the-scenes look at Day of Data Jacksonville 2026, the transition from SQL Saturday,...

Read the latest Blogs

Forums

Bank BCA KCU BCA KCU Jayapura telp 0817 844 112

By w4l3t3

WhatsApp CS,0817844112 Komp. Pertokoan Jayapura, Jl. Pacific Permai Jl. Dr. Sam Ratulangi No.31 Blok...

Bank BCA KCU Tanjung Pandan telp 0817 844 112

By w4l3t4

WhatsApp CS,0817844112 Jl. Jend. Sudirman No.17, RT.008/RW.04, Pangkal Lalang, Kec. Tj. Pandan, Kabupaten Belitung,...

Install SQL Scripts via GUI Wizard

By Jörg

Hallo all! My problem is this: I have quite a bunch of TSQL scripts...

Visit the forum

Question of the Day

Converting Money

Does this run successfully on a SQL Server 2022, US English default installation?

DECLARE @YenAmount MONEY;
SET @YenAmount = ¥1500; 

SELECT @YenAmount AS RawValue;

See possible answers