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 - 2005 - Database Table Partitioning Tutorial - How to Horizontal Partition Database Table

SQL SERVER – 2005 – Database Table Partitioning Tutorial – How to Horizontal Partition Database Table

January 25, 2008
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Scripts, SQL Server, Table Partitioning

A simple Table Partitioning tutorial for SQL Server 2005 that shows, step by step, how to horizontally partition a database table across two filegroups.

Read More
Database files listing.

SQL SERVER – Get a Row Per File of a Database as Stored in the Master Database

January 21, 2008
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server, SQL System Table

Each database has at least two files. This quick script on sys.master_files returns a row per file of a database, just as it is stored in master.

Read More
Two empty pale ceramic bowls beside a small terracotta pebble.

UNICODE: Supplementary Characters Depend on the Collation

January 18, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

UNICODE returns an integer for the first character, and supplementary-character support affects that integer. I make the collation explicit when interpreting those values. Otherwise the same visible input can produce a misleading comparison.

Read More
Three woven baskets hold nothing, folded cream linen and blue wool, respectively.

COALESCE Fallbacks: Empty Text Is Still a Supplied Value

January 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

COALESCE fallbacks keep empty text and spaces as supplied values. Apply an empty-value policy before choosing a display name.

Read More
Two ivory trays hold separate groups of small blue and cream ceramic dishes.

Conditional COUNT: ELSE 0 Counts Nonmatching Rows

January 13, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Reports, SQL Scripts, SQL Server

Conditional COUNT includes zero when CASE returns it. I compare an omitted ELSE with a zero branch before aggregating. A no-match group and an empty input expose the difference from SUM.

Read More
A gouache cabinet shows usable space reclaimed inside an unchanged drawer, with removed dividers set aside.

SQL SERVER – Reclaim Space After Dropping Variable – Length Columns Using DBCC CLEANTABLE

January 11, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server DBCC, SQL System Table

DBCC CLEANTABLE can reclaim selected space left after dropping variable-length columns. I distinguish that table operation from shrinking a database file.

Read More
Gouache painting: two lengths of smooth cream rope lie on a polished wooden floor: one forms a closed oval, the other a closed figure eight that crosses itself once in the middle, where a small vermilion bead sits

geometry STIsClosed and STIsSimple: Ask Both Questions

January 6, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

geometry STIsClosed does not establish simplicity. These three complete line descriptions compare endpoint closure with self-intersection.

Read More
Previous 1 … 392 393 394 395 396 397 398 … 420 Next
  • Books
  • Testimonials
  • Privacy Policy

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