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
A row of wooden coat hooks on a wall, each holding a ring of keys, a few rings with small red tags.

Database Roles: Give Permissions to Groups, Not People

August 28, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server Security

Database roles let you grant permissions to a group once, then add and remove members as jobs change. This post covers the fixed roles and the risk of db_owner, shows how to create a custom role, and checks role membership and permissions with queries.

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
Three interlocking gears on a pale board, two wooden and one gray, the middle gear with a red center.

Joining Three Tables: Following the Keys Step by Step

August 23, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Constraint and Keys, SQL Joins, SQL Scripts

Joining three tables is easier when you add one join at a time and check the row count after each step. This post builds a small bookshop query from Customers, Orders and OrderLines, adds the book titles, and shows how a missing join condition multiplies rows.

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
A hand picking a single small star-shaped shell out of a long tideline of scattered shells on a beach.

Escaping Wildcards in LIKE: Searching for % and _ Literally

August 19, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

Handle escaping wildcards in SQL Server LIKE searches with brackets, ESCAPE, and a reusable function that preserves literal input.

Read More
Previous 1 … 182 183 184 185 186 187 188 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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