To keep only digits in a column, a CHECK constraint with NOT LIKE and a character range works, but it has two holes. It accepts an empty string and digits from other scripts. A demo closes both and shows NULL, trust and fixed length codes.
ALTER SCHEMA TRANSFER: Move a Table to Another Schema
ALTER SCHEMA TRANSFER moves a table to another schema and leaves repairs behind. A demo shows that permissions disappear and views break while the data stays. It also shows a synonym that keeps old queries working.
Transactions and Variables – SQL in Sixty Seconds #150
Transactions and Variables both are not related at all. There is no impact of a transaction on a variable. Let us learn about it today.
SQL SERVER – Datatype Decimal Explained – Datatype Numeric
Just the other day I received an email from a client who was confused about the Datatype Decimal. Let us learn today how it works.
Room for an Index Build: Free Space and TempDB Placement
Room for an index build is the free space that your database and tempdb need before the build starts. This post estimates the index, checks both places, breaks a build on purpose, and shows what SORT_IN_TEMPDB moves and what it leaves in your database.
Grid vs Text Output in SSMS: Why Line Breaks Disappear
Grid vs text output is a Management Studio setting that decides whether the line breaks in your data stay visible. This post builds a value with a line break, proves with T-SQL that the data holds it, and shows how to keep the break in each mode.
SQL SERVER – Move a Table From One Schema to Another Schema
ALTER SCHEMA can Move a Table between schemas within one database. A customer had imported under the wrong schema.







