What is a trusted constraint in SQL Server? Many experts do not know, so instead of a definition I explain it with a simple check constraint example.
Drop Multiple Tables with One DROP TABLE Statement
To drop multiple tables in SQL Server, list them in one DROP TABLE statement, referencing tables first. This post tests the order rule on a parent and child table and shows what happens after an error. It also covers IF EXISTS, drops by name pattern and temporary tables.
How to Create Primary Key Without ANY Index? – Interview Question of the Week #143
Question: How to create primary key without ANY index? SQL Server builds a clustered or nonclustered index for every primary key, so here is the answer.
SQL SERVER – How to Find UNIQUE Key Columns? – sp_special_columns
Want to know which columns uniquely identify a row in a table? The system stored procedure sp_special_columns tells you. Here is a quick demo.
How to Allow Only Alphabets in Column? – Interview Question #136
Question: How to Allow Only Alphabets in Column? Answer: This was a real world scenario and I have mixed feeling about this kind of question.
Nullable Foreign Keys: Optional Relationships and Outer Joins
A nullable foreign key lets a row say no relationship yet. I show what the constraint checks, why an inner join drops those rows, and where WHERE bites.







