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
Equal lengths of plank stacked neatly, a large leftover piece dropped in a red scrap bin.

Integer Division in T-SQL: Why Your Percentages Come Out Zero

August 17, 2013
Pinal Dave
SQL Tips and Tricks
Mathematical Function, SQL Datatype, SQL Server

Fix integer division in T-SQL percentages from COUNT, SUM and window calculations with decimal types and rounding at the right step.

Read More
A tall metal garden gate with a key hanging on a red tassel beside it, and a quiet courtyard of doors beyond.

Logins and Users in SQL Server: Who Gets In and What They Can Do

August 16, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Login, SQL Scripts, SQL Server Security

Logins and users are two different things in SQL Server. A login gets a person or an application into the server, and a user gets them into one database. This post explains Windows and SQL authentication, how a login maps to a user, and how to check the mapping with a query.

Read More
Two wall shelves of glass jars, each jar holding a different grain, lentil or bean, one jar with a red lid.

What Are Filegroups in SQL Server and When to Use Them

August 15, 2013
Pinal Dave
SQL Tips and Tricks
Database, SQL Data Storage, SQL Scripts, SQL Server Architecture

What are filegroups in SQL Server? A filegroup is a named container for data files, and an ordinary table or index lives in exactly one. This post builds a small demo, shows where a table lands, and gives honest advice on when extra filegroups help and when they only add work.

Read More
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
Previous 1 … 471 472 473 474 475 476 477 … 844 Next
  • Books
  • Testimonials
  • Privacy Policy

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