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 - Simple Example of WHILE Loop with BREAK and CONTINUE

SQL SERVER – Simple Example of WHILE Loop with BREAK and CONTINUE

February 4, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts

A very simple example of WHILE Loop with BREAK and CONTINUE, plus a Books Online sample that uses a SELECT query in the WHILE condition.

Read More
SQL SERVER - Find All The User Defined Functions (UDF) in a Database

SQL SERVER – Find All The User Defined Functions (UDF) in a Database

February 2, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

A very simple script that lists all the User Defined Functions in a database, with schema name and type, by reading sys.objects in SQL Server.

Read More
Two wooden meringue boards, each with four meringues and two empty wells on opposite ends.

binary Conversion: Strings and Numbers Pad on Different Sides

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

binary Conversion pads and truncates on different sides depending on the source type. I compare one integer with one string at two target widths. The resulting byte sequences show why width alone is not the complete rule.

Read More
Three upright carved wooden forms stand in a shallow wooden tray beside a red cloth and tool case.

REPLICATE: Zero Copies and Negative Counts Differ

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

REPLICATE treats zero copies differently from a negative count. I keep the source and requested count beside the result. Byte lengths and NULL flags reveal several blank-looking outcomes.

Read More
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
Previous 1 … 320 321 322 323 324 325 326 … 363 Next
  • Books
  • Testimonials
  • Privacy Policy

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