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
A tall wooden cabinet of small drawers with a paper strip running out of it, a small lamp with a red base glowing beside it.

Data Files and Log Files: What Each One Does in SQL Server

August 14, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Data Storage, SQL Log, Transaction Log

Data Files and Log Files are the two kinds of file every SQL Server database needs. This post explains what lives in each, why the log is written first, and how to list both with a query on sys.database_files.

Read More
Two wooden storage boxes on the floor joined by a short chain locked with a red padlock, one lid open.

What Is a Foreign Key, and What It Protects

August 13, 2013
Pinal Dave
SQL Tips and Tricks
Database, Primary Key, SQL Constraint and Keys, SQL Index

What is a foreign key? It’s a column that must match a key in another table, and SQL Server refuses any value that has no match. This post shows the error it raises, the ON DELETE options, and why the foreign key column needs an index of its own.

Read More
A small metal press with a red handle beside a row of leaf shapes cut from clay, one leaf colored red.

SQL Code Generators: Let SSMS Write the Script for You

August 12, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server Management Studio, SQL Table Operation

SQL Code Generators in SSMS turn clicks into T-SQL. This post shows the Script button on dialogs, the Generate Scripts wizard and Select Top 1000 Rows, plus the checks I run before I trust a generated script.

Read More
A tidy workshop bench with open drawers of sorted parts and tools hanging on a pegboard, a lamp glowing at one end.

Using Management Studio: A First Tour of SSMS 22

August 11, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Connection, SQL Server Management Studio, Starting SQL

Using Management Studio gets easier once you know where to look. This first tour of SSMS 22 covers the connection dialog, Object Explorer, the query window, running a query, reading the results and saving a .sql file, with one small demo script to follow along.

Read More
A bookbinder's bench with an old book's pages beside a new red cloth cover.

Converting Deprecated TEXT, NTEXT and IMAGE Columns Safely

August 10, 2013
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Deprecated Feature, SQL Server, SQL Upgrade

Inventory deprecated TEXT, NTEXT and IMAGE columns, convert to MAX types, move small values in row, and measure logging and space costs.

Read More
An open wooden toolbox on a bench with a pair of pliers inside and a small blank paper tag tied on with red string.

SQL Code Comments: Notes Your Future Self Can Read

August 9, 2013
Pinal Dave
SQL Tips and Tricks
SQL Coding Standards, SQL Scripts, SQL Server Management Studio, Starting SQL

SQL Code Comments are the notes SQL Server skips and your teammates read. This post shows the two comment styles, what is worth writing in them, a header block for scripts and procedures, and how to stop a comment from lying after the code changes.

Read More
Two small wooden blocks are joined by one simple brass latch on an oak table.

Keeping ACID Across More Than One Server

August 8, 2013
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server

Understand a distributed transaction through two-phase commit, uncertain outcomes, coordinator recovery, and alternative business guarantees.

Read More
A pale jigsaw puzzle with one red piece fitting into the gap and two loose gray pieces lying to the side.

Joining Tables in SQL Server: INNER, LEFT and FULL Joins

August 8, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Joins, SQL NULL, SQL Scripts, SQL Table Operation

Joining Tables lets one query combine rows from two tables that share a value. This post uses small Customers and Orders tables to show what INNER, LEFT and FULL OUTER joins return, how many rows each one gives, and how to read the rows that have no match.

Read More
Three wooden wagons waiting on a country road at a level crossing, a striped barrier arm lowered in front of them.

Running SQL Code: Execute, Batches and GO in SSMS

August 7, 2013
Pinal Dave
SQL Tips and Tricks
Batch, Database, SQL Scripts, SQL Server Management Studio

Running SQL code in SSMS starts with F5 or the Execute button. This post covers running only a selection, what a batch is, why GO is not T-SQL, why variables disappear after GO, and how GO with a number repeats a batch.

Read More
Smooth wooden beads scattered on a pale table beside a wooden tray of the same beads sorted into rows, one red bead lifted on a spoon.

Data and Information: Why Every Business Runs on a Database

August 6, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Data Storage, SQL Scripts, SQL Table Operation

Data and Information are not the same thing. Data is the raw facts a business stores, and information is the answer you get when a query processes them. This post uses a small bookshop table to show the difference, and why a database does the job better than a ledger or a spreadsheet.

Read More
Previous 1 … 331 332 333 334 335 336 337 … 593 Next
  • Books
  • Testimonials
  • Privacy Policy

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