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
SQL SERVER - CTE can be Updated

SQL SERVER – CTE can be Updated

May 19, 2014
Pinal Dave
SQL Tips and Tricks
CTE, SQL Scripts, SQL View

Users often confuse a CTE with a temp table, but a CTE works like a view, and a CTE can be updated just like one. Matthew Spieth’s tip, with my notes.

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 plumber's hands fitting a brass valve into a central copper pipe, with branch pipes running off to different rooms.

Renaming a Column Safely Everywhere It Is Used

October 1, 2012
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Column, SQL Server, SQL Stored Procedure, SQL View

Renaming a column safely requires finding SQL and application references, applying sp_rename, refreshing modules, and testing every consumer.

Read More
SQL Server query designer top 100 percent.

SQL SERVER – SSMS Automatically Generates TOP (100) PERCENT in Query Designer

September 18, 2012
Pinal Dave
SQL Tips and Tricks
SQL Server Management Studio, SQL View

Why does Query Designer in SSMS keep adding TOP (100) PERCENT when you create a view? A forum question, the full scenario, and what is going on.

Read More
A garlic press handles one clove through its single chamber while whole garlic bulbs stay outside

Updatable Views: When INSERT and UPDATE Work Through a View

August 9, 2012
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Error Messages, SQL Table Operation, SQL View

A view is only a doorway to the table behind it. I show which writes get through, which get rejected, and why CHECK OPTION earns its place.

Read More
A narrow fabric tape stretches between two fixed clips with cloth extending outside both ends

Time-Limited Access: Expiring Grants With a Valid-Until Column

July 21, 2012
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL DateTime, SQL Server Security, SQL View

A ValidUntil column does nothing by itself. Here is how to make the read path enforce it, with a demo you can run.

Read More
A wooden board with rows of small square openings and an oversized red piece leaning against it that cannot fit.

Indexed View Restrictions Quiz: Which Rule Blocks the Index?

January 8, 2012
Pinal Dave
SQL Puzzle
Clustered Index, SQL Error Messages, SQL Index, SQL Joins, SQL View

This Indexed View Restrictions Quiz asks which rule stops a unique clustered index on a view. The answer is the LEFT OUTER JOIN. A tested script shows the error, the working view, and what happens when each required rule is missing.

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

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