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 skate rental counter by an ice rink, pairs of skates on hooks and one pair with vermilion laces.

Session State in SQL Server With Memory-Optimized Tables

October 10, 2022
Pinal Dave
SQL Tips and Tricks
In-Memory OLTP, SQL Memory, SQL Server, SQL Stored Procedure

Store transient session state in memory-optimized SQL Server tables with native reads and writes, expiry checks, and clear durability rules.

Read More
Man with sculptures and text.

Using Stored Procedure in SELECT – SQL in Sixty Seconds #193

February 15, 2022
Pinal Dave
SQL Video
Ad Hoc Query, SQL in Sixty Seconds, SQL Server, SQL Stored Procedure

Today we are going to learn about how Using Stored Procedure in SELECT. However, the easiest method to run the stored procedure.

Read More
A mechanism delivers shaped components into a matching tray for separate assembly work.

SQL SERVER – Capturing Stored Procedure Results with a Matching INSERT EXEC Table

February 8, 2022
Pinal Dave
SQL Tips and Tricks
Ad Hoc Query, SQL Server, SQL Stored Procedure

A stored procedure is not normally a table expression in a SELECT Statement. The question concerned rows from uspGetManagerEmployees.

Read More
Gouache painting of a big unrolled quilt beside a small tightly rolled one tied with a vermilion band

Estimate Compression Savings for Every Table in a Database

December 15, 2021
Pinal Dave
SQL Tips and Tricks
Compression, SQL Scripts, SQL Stored Procedure

To estimate compression savings for every table, loop over the database and call sp_estimate_data_compression_savings with ROW and PAGE. This post ranks tables by space saved and checks one estimate against a real rebuild.

Read More
A pair of white ice skates on a snowy bench with a loose coil of lace beside them

ZIP Codes Stored as int: Lost Zeros and How to Repair Them

December 10, 2021
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Server, SQL Stored Procedure

An int column turns 01234 into 1234 and never gives the zero back. Here is how to fix the column, and how to repair old rows without guessing.

Read More
Gouache painting of a pegboard with grey tool shapes and a screwdriver with a vermilion handle lying on the bench

Last Used Stored Procedure in SQL Server: When Did It Last Run?

October 25, 2021
Pinal Dave
SQL Tips and Tricks
Query Store, SQL Scripts, SQL Stored Procedure

To find the last used stored procedure, read last_execution_time from sys.dm_exec_procedure_stats. This post tests it on demo procedures, shows why a NULL does not mean never, and adds Query Store for a longer memory.

Read More
Gouache painting of a snowflake-shaped cutout with a vermilion centre on cloth beside shears on a sewing table

Snowflake JavaScript Procedure: A Stored Procedure Template

September 30, 2021
Pinal Dave
SQL Tips and Tricks
Snowflake, SQL Server, SQL Stored Procedure

A Snowflake JavaScript procedure wraps SQL statements in JavaScript code. This post gives a clean template, shows how to call it, read a result, pass an argument and catch an error. The code follows Snowflake’s documented API and was not run on a Snowflake account.

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

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