• Skip to primary navigation
  • Skip to content
  • Skip to footer
Sanjay Singh's Blog An another perspective
  • Home
  • Archives
    1. Home
    2. /
    3. 2010
    4. /
    5. 10
    6. /
    7. 29
    8. /
    9. Check if given column exists in a table in SQL Server database

    Check if given column exists in a table in SQL Server database

    October 29, 2010

    Following SQL statement checks to see if column “Address” exists in the “Employee” table. If the column does not exist it adds that column.

    If Not Exists (Select * From Information_Schema.Columns 
                   Where Table_Name = 'Employee' And Column_Name = 'Address')
    Begin
        Alter Table Employee Add Address nvarchar(200)
    End
    

    Tags: SQL Server

    Updated: October 29, 2010

    Share on

    Twitter Facebook LinkedIn
    Previous Next

    You May Also Enjoy

    Cursor-ControlPlane: Run Cursor CLI From Your Phone

    March 25, 2026

    I built Cursor-ControlPlane to control Cursor CLI sessions on my own machine from a web UI or a Telegram chat.

    Domain Finder: A Tool to Discover Available Domain Names

    March 20, 2026

    I’ve built Domain Finder—a tool to check domain availability and discover available domains. It uses RDAP to verify registration status.

    In-Browser GraphQL Playground

    September 17, 2025

    Hey folks!

    An Offline Code Editor

    April 5, 2025

    Hey everyone,

    • GitHub
    • Feed
    © 2026 Sanjay Singh's Blog. Powered by Jekyll & Minimal Mistakes.