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 cut orange with half dyed blue.

SQL SERVER – Validating Unique Column Name Across Whole Database

September 22, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL System Table

I sometimes come across very strange requirements and often I do not receive a proper explanation of the same. Validating Unique Column Name

Read More
SQL Server column information.

SQL SERVER – INFORMATION_SCHEMA.COLUMNS and Value Character Maximum Length -1

July 20, 2012
Pinal Dave
SQL Tips and Tricks
SQL System Table

Why does INFORMATION_SCHEMA.COLUMNS show -1 as the character maximum length? A reader asked me this simple question, and I explain what the negative value means.

Read More
SQL SERVER - Get Schema Name from Object ID using OBJECT_SCHEMA_NAME

SQL SERVER – Get Schema Name from Object ID using OBJECT_SCHEMA_NAME

May 15, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table

Many people join sys.tables and sys.schemas to get a schema name from an object ID. The OBJECT_SCHEMA_NAME function does it in one simple call.

Read More
SQL SERVER - Resource Database ID - 32767

SQL SERVER – Resource Database ID – 32767

May 10, 2011
Pinal Dave
SQL Tips and Tricks
SQL System Table

Why does DB_NAME(32767) return NULL? Resource Database ID 32767 belongs to the hidden Resource Database, which you will not find in sys.databases.

Read More
Tempdb table negative objectid.

SQL SERVER – Denali – ObjectID in Negative – Local TempTable has Negative ObjectID

March 23, 2011
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table

On Denali I saw many negative ObjectID values in sys.all_objects. Here is how I found out that each local temp table gets a negative ObjectID.

Read More
A fingertip touching one strand of a dewy spider web in a garden, drops trembling across the whole web

Finding Every Object That Uses a Column

December 11, 2010
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Dependency, SQL Server, SQL System Table

Find an object that uses a column with dependency metadata and module text search, then check dynamic SQL and application code.

Read More
Execution plan of SQL Server query.

SQL SERVER – System Stored Procedure sys.sp_tables

October 17, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure, SQL System Table

Most people run SELECT * FROM sys.tables to list tables. If you do not need all those details, sys.sp_tables returns tables and views with schema names.

Read More
Previous 1 … 3 4 5 6 7 8 9 … 16 Next
  • Books
  • Testimonials
  • Privacy Policy

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