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
column exists

SQL SERVER – Checking If a Column Exists in a Table

August 24, 2023
Pinal Dave
SQL Tips and Tricks
Schema, SQL Column, SQL Table Operation, System Object

Let us see a script that will help check if a Column Exists in a Table. One of the common tasks that developers deal with when working on database-related projects

Read More
retrieve column names

SQL SERVER – Scripts to Retrieve Column Names

August 22, 2023
Pinal Dave
SQL Tips and Tricks
Computed Column, SQL Column, SQL DMV

Understanding how to retrieve column names from a table is one of the fundamental operations you should be familiar with.

Read More
Gouache painting: a frosted-glass window over a market stall, fruit shapes blurred behind it, one vermilion pomegranate seen sharp and clear

Masking Functions in SQL Server: What Each One Shows

August 2, 2023
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Scripts, SQL Server 2022, SQL Server Security

Dynamic data masking hides values at query time, and the masking functions decide what a reader still sees. This post tests default, email, partial, random and datetime on SQL Server 2025 and shows what each one returns. It also covers adding and dropping a mask on an existing column.

Read More
A kitchen dresser with plates and cups on open shelves, one shelf hidden behind a small drawn curtain.

Column-Level Permissions: Hiding One Column From Some Users

April 26, 2023
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Server, SQL Server Security, SQL View

Apply SQL Server column-level permissions, test DENY and SELECT behavior, inspect explicit grants, and compare views with data masking.

Read More
swap columns

Swap Columns – SQL in Sixty Seconds #199

August 2, 2022
Pinal Dave
SQL Video
SQL Column, SQL in Sixty Seconds

Today we will see a quick video on how to swap columns in SQL Server. It is a widespread request. We will learn that in this video.

Read More
An inspection lens examines an optional insert while a removal tool remains separate.

SQL SERVER – Checking Column Existence Is Different from DROP IF EXISTS

September 3, 2021
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Scripts, SQL Server

I use COL_LENGTH to Check If a Column Exists in visible metadata. Conditional DROP instead performs a deletion.

Read More
Gouache painting of a xylophone with grey bars on the left and vermilion bars on the right, with a mallet beside it

max_column_id_used: How Many Columns a Table Once Had

July 29, 2021
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL DMV, SQL Scripts, SQL Table Operation

The max_column_id_used column shows how many columns a table ever had. See it grow, find tables that lost columns, and avoid treating column_id as a position.

Read More
1 2 3 4 … 7 Next
  • Books
  • Testimonials
  • Privacy Policy

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