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
Round wooden pieces fit a blue sorting frame while an angular red piece remains outside.

SQL SERVER – How to Allow Only Alphabets in Column – Create Check Constraint to Insert Only Alphabets

December 9, 2013
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts, SQL Server

Allow only alphabets in a SQL Server column with an explicit ASCII-letter rule. These tested examples reject empty strings, NULL, spaces, digits, and punctuation while explaining collation and existing-data checks.

Read More
A pinsetter deck holds round bowling pins while a square block cannot fit its opening

Edge Constraints: Controlling Which Nodes a Graph Edge Connects

November 19, 2013
Pinal Dave
SQL Tips and Tricks
Schema, SQL Constraint and Keys, SQL Delete

An edge table with no rules accepts nonsense links. Add an edge constraint, watch the bad edge fail, and see what the constraint still does not check.

Read More
A steel connector joins one cream cord to an eyelet while a second cord remains unattached

Polymorphic Associations: Why One Column Cannot Point at Many Tables

October 15, 2013
Pinal Dave
SQL Tips and Tricks
Normalization, Schema, SQL Constraint and Keys

One column that points at many tables cannot be enforced by SQL Server. Here is the demo, the orphans it allows, and a design that says no to bad rows.

Read More
A shed shelf of clay pots, several turned upside down among growing plants.

Soft Delete With an IsDeleted Column: Indexes, Views and Keys

September 7, 2013
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Index, SQL Server, SQL View

Design soft delete with an IsDeleted flag, filtered unique keys and indexes, a live-row view, and a measured archive process.

Read More
A new wooden shelf unit standing on a workshop floor beside a small dish of wooden pegs, one red peg nearby.

Designing Your First Table: Columns, Keys and Data Types

September 1, 2013
Pinal Dave
SQL Tips and Tricks
Primary Key, SQL Column, SQL Constraint and Keys, SQL Datatype, SQL Table Operation

Designing Your First Table gets easier when you decide what it must hold before you write any SQL. This post walks through naming, data types, NULL or NOT NULL, a primary key, a default and a check constraint on a small Customers table. It also shows what to leave for later.

Read More
Three interlocking gears on a pale board, two wooden and one gray, the middle gear with a red center.

Joining Three Tables: Following the Keys Step by Step

August 23, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Constraint and Keys, SQL Joins, SQL Scripts

Joining three tables is easier when you add one join at a time and check the row count after each step. This post builds a small bookshop query from Customers, Orders and OrderLines, adds the book titles, and shows how a missing join condition multiplies rows.

Read More
A wooden seed tray seen from above with rows and columns of small green seedlings, one cell marked with a red stick.

Rows, Columns and Tables: How a Database Holds Information

August 21, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Column, SQL Constraint and Keys, SQL Data Storage, SQL Table Operation

Rows, Columns and Tables are the three ideas behind every relational database. A table holds one kind of thing, a column describes one fact about it, and a row records one item. This post builds a small Books table in SQL Server and reads it back by row and by column.

Read More
Previous 1 … 6 7 8 9 10 11 12 … 24 Next
  • Books
  • Testimonials
  • Privacy Policy

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