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
Table or View in SQL Server: Check With OBJECTPROPERTY
To settle table or view in SQL Server, ask OBJECTPROPERTY. This post builds a table, a view, a synonym and a procedure, and reads the answers for each. It also shows a trap with other databases and a catalog query for every object.
SQL SERVER – Offline, Detach and Drop – Differences – SQL in Sixty Seconds #103
if I can help them understand the difference between database status like Offline, Detach and Drop. It was very important to differences.
Background Job Queue: List Active Jobs and Kill a Stats Job
The background job queue holds work that SQL Server runs outside your queries, such as asynchronous statistics updates. This post lists the active jobs, reads the queue counters, catches a real statistics job in a demo and kills it with KILL STATS JOB. It also corrects a common mix-up: the command takes the job ID, not the session ID.
IO Stalls by Database File: Find the File to Move
IO stalls measure how long SQL Server waited for the disk, file by file. This post ranks the files of a demo database by stall time, measures a workload with two snapshots, lists the busiest files of a whole instance, and explains how to pick the one file that belongs on the new drive.
Show Primary Key of a Table in SQL Server With sp_pkeys
To show primary key columns for one table, call sp_pkeys with the table name. This post builds a small demo database, reads a single column and a composite key, and handles schemas and errors. It also lists every key in a database with one catalog query.






