Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Add Column If Does Not Exist

Posted on November 12, 2013October 26, 2015 By David Kittell

This code will assist in helping you create a column should it not already exist.

IF COLUMNPROPERTY(OBJECT_ID('dbo.address'), 'zip4', 'ColumnId') IS NULL
BEGIN
	ALTER TABLE address
	ADD zip4 INT NULL
END
Originally Posted on November 12, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code MSSQL SQL

Post navigation

Previous post
Next post

Related Posts

Bash / PowerShell – Rip Sermon Audio From CD

Posted on January 1, 2019April 9, 2023

To expand on an earlier post “MacPorts / HomeBrew – Rip CD tracks from terminal” I have worked on two scripts; one for Mac and one for PC. Both scripts (Bash and PowerShell) will run similar with predefined values that you’ll need to update for your own purposes (look at…

Read More

FixedSplit

Posted on February 21, 2013October 26, 2015

public static string FixedSplit(string s, int len, string delim) { StringBuilder sb = new StringBuilder(s.Length + (int)(s.Length / len) + 1); int start = 0; for (start = 0; start < s.Length – len; start += len) { sb.Append(s.Substring(start, len)); sb.Append(delim); } sb.Append(s.Substring(start)); return sb.ToString(); } Originally Posted on February…

Read More

PowerShell – Show File Extensions

Posted on August 30, 2016

function ShowFileExtensions() { # http://superuser.com/questions/666891/script-to-set-hide-file-extensions Push-Location Set-Location HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced Set-ItemProperty . HideFileExt "0" Pop-Location Stop-Process -processName: Explorer -force # This will restart the Explorer service to make this work. } ShowFileExtensions function HideFileExtensions() { # http://superuser.com/questions/666891/script-to-set-hide-file-extensions Push-Location Set-Location HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced Set-ItemProperty . HideFileExt "1" Pop-Location Stop-Process -processName: Explorer -force # This will…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes