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
Two new cups differ: one remains empty while the other receives the standard pebble

How Default Value and Nullable Column Works? – Interview Question of the Week #129

July 2, 2017
Pinal Dave
SQL Interview Questions and Answers
SQL NULL, SQL Scripts, SQL Server

How do a default value and a Nullable Column work together in one table? Two short scripts from an interview panel show exactly what SQL Server does.

Read More
Distinct brass keys each occupy their required place in a wooden organizer

Can We Have NULL Value in Primary Key? – Interview Question of the Week #075

June 12, 2016
Pinal Dave
SQL Interview Questions and Answers
SQL Constraint and Keys, SQL NULL, SQL Scripts, SQL Server

Can we have a NULL value in primary key columns? No. The primary key has to uniquely identify each row, and NULL cannot do that. Here is why.

Read More
Every place in an egg carton contains an egg

What is NOT NULL Constraint? – Interview Question of the Week #073

May 29, 2016
Pinal Dave
SQL Interview Questions and Answers
SQL Constraint and Keys, SQL NULL, SQL Scripts, SQL Server

A client table full of NULL values was hurting query plans. Here is what a NOT NULL constraint is, how to add one and why it helped performance.

Read More
Gate latch with one toggle seated and the other lifted

AND Before OR: Operator Precedence in WHERE Clauses

July 20, 2014
Pinal Dave
SQL Tips and Tricks
SQL Coding Standards, SQL NULL, SQL Operator

A report showed closed orders even though the filter said open. The reason is how SQL Server groups AND and OR.

Read More
Two strips of matching leaf wallpaper side by side on a floor, one with a single red leaf that differs.

Finding Rows That Differ Between Two Tables With EXCEPT

June 23, 2014
Pinal Dave
SQL Tips and Tricks
SQL Distinct, SQL NULL, SQL Operator, SQL Server

Use EXCEPT to find differing rows in both directions, compare selected columns, handle NULLs, and distinguish changed keys from additions.

Read More
A chair caster replacement keeps sound wheels while replacing a worn wheel

Syncing a Lookup Table Without MERGE: Insert, Update, Delete

May 20, 2014
Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Table Operation, SQL Transactions

Three plain statements can do the job of MERGE, and each one gives you its own row count. Here is how to build it, test it and trust it.

Read More
An open bento box with neat compartments, one holding a row of small rice balls, a red plum on the rice.

JSON_OBJECT and JSON_ARRAY: Building JSON in SQL Server 2022

March 30, 2014
Pinal Dave
SQL Tips and Tricks
JSON, SQL Function, SQL NULL, SQL Server, SQL Server 2022

Build JSON_OBJECT and JSON_ARRAY values in SQL Server 2022, control null handling, nest arrays, and compare rowset and aggregate output.

Read More
Previous 1 2 3 4 5 6 7 … 12 Next
  • Books
  • Testimonials
  • Privacy Policy

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