My colleague renamed a table to [] by accident and sp_rename failed. Here is how to rename a table name containing [ or ] characters.
Script Table As in SSMS: CREATE, INSERT and SELECT in One Click
Script Table As is the right-click menu in SSMS that writes CREATE, SELECT, INSERT, UPDATE and DELETE statements for a table. This post shows what each option writes, what the scripts leave out, and how to run them safely.
Query Options in SSMS: Settings That Change Your Results
Query Options are the per-window settings in SSMS that change how a query runs and how its results look. This post covers results to grid, text or file, the character limits that cut long values, the SET options that change answers, and why SSMS and your application can disagree.
Commenting Out Code: Testing Safely in SSMS
Commenting Out Code is the quickest way to switch off part of a script while you test the rest. This post covers the SSMS shortcuts, testing one WHERE filter at a time, the trap of GO inside a block comment, and a safety note to leave above a DELETE.
Keeping Admin Scripts One Click Away in SSMS Template Explorer
Organize SSMS Template Explorer scripts, fill reusable parameters, review a copy-only backup, and preserve custom templates on disk.
SQL Code Generators: Let SSMS Write the Script for You
SQL Code Generators in SSMS turn clicks into T-SQL. This post shows the Script button on dialogs, the Generate Scripts wizard and Select Top 1000 Rows, plus the checks I run before I trust a generated script.






