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: seen from above, a square vegetable bed has a triangular notch of bare grass cut into one side

STConvexHull: Enclose a Shape Without Its Indentations

October 16, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

STConvexHull encloses a geometry with its smallest convex hull. Compare a concave polygon, a collinear line and a point using area and membership.

Read More
Three blue stones in a pale shallow bowl, an empty bowl and one separate blue stone.

Multiset Difference: Remove Only Matching Duplicate Occurrences

October 10, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Joins, SQL Scripts, SQL Server

Multiset difference removes matching occurrences while keeping any extra copies from the left input. I assign occurrence numbers before pairing rows. A value’s presence on the right should not automatically remove every left copy.

Read More
Sql server query results window.

SQL SERVER – 2005 – Sample Example of RANKING Functions – ROW_NUMBER, RANK, DENSE_RANK, NTILE

October 9, 2007
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Scripts

SQL Server 2005 has four ranking functions: ROW_NUMBER, RANK, DENSE_RANK and NTILE. I explain what each returns and show a sample example of all four.

Read More
Gouache painting: a wooden jetty made of five floating pontoon sections lies on calm water in a row

LEN Versus DATALENGTH: Trailing Spaces and Unicode Bytes

September 30, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

LEN versus DATALENGTH answers different length questions. Use explicit text types to check trailing spaces, Unicode bytes, empty values and NULL.

Read More
SQL SERVER - Two Connections Related Global Variables Explained - @@CONNECTIONS and @@MAX_CONNECTIONS

SQL SERVER – Two Connections Related Global Variables Explained – @@CONNECTIONS and @@MAX_CONNECTIONS

September 29, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Transactions

@@CONNECTIONS and @@MAX_CONNECTIONS explained: login attempts since SQL Server started versus the most simultaneous user connections allowed.

Read More
SQL SERVER - UDF - Validate Positive Integer Function - Validate Natural Integer Function

SQL SERVER – UDF – Validate Positive Integer Function – Validate Natural Integer Function

September 18, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

A Jr. DBA at my company changed my integer check so it accepts only a positive integer. I share his udf_IsNatural function with a few test values.

Read More
SQL SERVER - Difference Between UPDATE and UPDATE()

SQL SERVER – Difference Between UPDATE and UPDATE() in Triggers

September 17, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

UPDATE changes rows in a table or view, while UPDATE() in triggers tells you if a column was part of an INSERT or UPDATE. Here is the difference.

Read More
Previous 1 … 77 78 79 80 81 82 83 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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