This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Rename a Table Name Containing [ or ] in the Name - Identifier in the Table Name

SQL SERVER – Rename a Table Name Containing [ or ] in the Name – Identifier in the Table Name

January 25, 2014
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio

My colleague renamed a table to [] by accident and sp_rename failed. Here is how to rename a table name containing [ or ] characters.

Read More
An open book on a pale table with a pressed leaf resting across its pages.

Script Table As in SSMS: CREATE, INSERT and SELECT in One Click

August 27, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio, SQL Table Operation, Starting SQL

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.

Read More
Three tall windows with pale blinds set at different angles, sunlight falling in strips across the floor.

Query Options in SSMS: Settings That Change Your Results

August 26, 2013
Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Scripts, SQL Server Configuration, SQL Server Management Studio

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.

Read More
A row of wall switches on wooden plates, the middle switch red and the others muted gray and cream.

Commenting Out Code: Testing Safely in SSMS

August 25, 2013
Pinal Dave
SQL Tips and Tricks
SQL Delete, SQL Scripts, SQL Server Management Studio, SQL Shortcut

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.

Read More
A blank sheet of paper pinned to a wooden door with a red wax seal, a small brass bell hanging in the hallway.

The Messages Tab in SSMS: Row Counts, Errors and Warnings

August 22, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Error Messages, SQL Scripts, SQL Server Management Studio

The Messages tab in SSMS shows what a query did, not what it returned. This post reads row counts, PRINT output, warnings and errors line by line, and explains what SET NOCOUNT ON changes.

Read More
Hands pressing clay into a wooden brick mold beside a row of identical fresh bricks drying

Keeping Admin Scripts One Click Away in SSMS Template Explorer

August 18, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio, SQL Shortcut, SQL Utility

Organize SSMS Template Explorer scripts, fill reusable parameters, review a copy-only backup, and preserve custom templates on disk.

Read More
A small metal press with a red handle beside a row of leaf shapes cut from clay, one leaf colored red.

SQL Code Generators: Let SSMS Write the Script for You

August 12, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server Management Studio, SQL Table Operation

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.

Read More
Previous 1 … 31 32 33 34 35 36 37 … 50 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com