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 - T-SQL Script to Add Clustered Primary Key

SQL SERVER – T-SQL Script to Add Clustered Primary Key

October 11, 2007
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts

A Jr. DBA asked me three times in one day how to create a clustered primary key, so I gave him this ALTER TABLE example. He never asked again.

Read More
Three blue stones in a pale shallow bowl, an empty bowl and one separate blue stone.

Multiset Difference: Remove Only Matching Duplicate Occurrences

October 10, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Joins, SQL Scripts, SQL Server

Multiset difference removes matching occurrences while keeping any extra copies from the left input. I assign occurrence numbers before pairing rows. A value’s presence on the right should not automatically remove every left copy.

Read More
Sql server query results window.

SQL SERVER – 2005 – Sample Example of RANKING Functions – ROW_NUMBER, RANK, DENSE_RANK, NTILE

October 9, 2007
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Scripts

SQL Server 2005 has four ranking functions: ROW_NUMBER, RANK, DENSE_RANK and NTILE. I explain what each returns and show a sample example of all four.

Read More
SQL SERVER - 2005 - Connection Property of SQL Server Management Studio SSMS

SQL SERVER – 2005 – Connection Property of SQL Server Management Studio SSMS

October 8, 2007
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Management Studio, SQL Utility

How to change connection properties in SSMS as you connect, like using named pipes instead of TCP/IP, as I do for one of our servers. Screenshots show each step.

Read More
A ring of plain brass keys on a doormat, one key with a vermilion painted bow standing out from the rest.

Why You Should Name Default Constraints

October 7, 2007
Pinal Dave
SQL Tips and Tricks
Schema, SQL Coding Standards, SQL Constraint and Keys, SQL Server

Name default constraints so deployments can find them reliably, and replace system-generated names through a reviewed migration.

Read More
SQL SERVER - Executing Remote Stored Procedure - Calling Stored Procedure on Linked Server

SQL SERVER – Executing Remote Stored Procedure – Calling Stored Procedure on Linked Server

October 6, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

Two ways to call a remote stored procedure on a linked server: a four part name with EXEC, or the OPENQUERY distributed query function.

Read More
SQL SERVER - 2005 - Open SSMS From Command Prompt - sqlwb.exe Example

SQL SERVER – 2005 – Open SSMS From Command Prompt – sqlwb.exe Example

October 5, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server Management Studio, SQL Shortcut, SQL Utility

Open SSMS from command prompt with the sqlwb command. I show its syntax and the switches I use, like -E and -nosplash, to start Management Studio.

Read More
Previous 1 2 3 4 5 Next
  • Books
  • Testimonials
  • Privacy Policy

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