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
Gouache painting of a slate blue jacket on a wooden hanger with every button sewn on, and a dish holding one spare button, vermilion thread and a needle

DROP IF EXISTS and CREATE OR ALTER for Iterative Deployments

July 11, 2013
Pinal Dave
SQL Tips and Tricks
DevOps, SQL Server, SQL Stored Procedure

Run your deployment script twice and see what survives. A short demo shows why CREATE OR ALTER keeps permissions and drop and create does not.

Read More
A bowl of cracked walnuts with one sealed walnut and a red nutcracker beside it.

Finding Encrypted Stored Procedures Before a Migration

July 6, 2013
Pinal Dave
SQL Tips and Tricks
SQL Migration, SQL Server, SQL Server Encryption, SQL Stored Procedure

Inventory encrypted stored procedures and other modules before migration, then recover their approved source and dependencies.

Read More
SQL SERVER - How to INSERT data from Stored Procedure to Table - 2 Different Methods

SQL SERVER – How to INSERT data from Stored Procedure to Table – 2 Different Methods

May 27, 2013
Pinal Dave
SQL Tips and Tricks
SQL Stored Procedure

How do you INSERT data from stored procedure results into a table? I show 2 methods: one when the table exists and one when it is created at run time.

Read More
SQL SERVER - The procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.

SQL SERVER – The procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.

April 8, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

Why does SQL Server say a procedure attempted to return a status of NULL and returns 0 instead? A reader asked on Facebook, and I explain what it means.

Read More
Gouache painting of a wooden chute carrying a red apple from one crate of green apples into another

How to Pass Stored Procedure Result to Another Procedure in SQL Server

April 7, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Stored Procedure, SQL Variable

To pass stored procedure result values from one procedure to another, use an OUTPUT parameter. This post tests RETURN codes, INSERT … EXEC and table-valued parameters on a small order demo. It also shows the errors each method raises and when a function is the better tool.

Read More
A large soap bubble with a smaller one inside, a red bubble wand in a dish.

Temp Table Scope in Nested Procedures and Dynamic SQL

March 30, 2013
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Stored Procedure, SQL TempDB, Temp Table

Explain temp table scope across nested procedures and dynamic SQL, reproduce missing and duplicate-name errors, and pass rows safely.

Read More
A lone hawthorn tree bent sideways by old winds on a calm day, a red gate below.

Finding Procedures Created With the Wrong SET Options

March 9, 2013
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Stored Procedure

Find procedures with wrong SET options in sys.sql_modules, understand error 1934, and recreate modules with ANSI_NULLS and QUOTED_IDENTIFIER ON.

Read More
Previous 1 … 13 14 15 16 17 18 19 … 35 Next
  • Books
  • Testimonials
  • Privacy Policy

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