in

Bunker Hollow

Matt Williamson's home on the web, welcome.
All Tags » SQL » Script » Software (RSS)

Browse by Tags

  • MS SQL Check If Column Exists

    The following SQL script checks if a certain column exists in a certain table, then prints some text to the output window. I'm getting into the best practice habit of creating SQL scripts that can be re-run without any errors and this is useful in checking to see if a column already exists before...
    Posted to Matt Williamson's Blog (Weblog) by Matt Williamson on 07-08-2009
  • MS SQL Loop Through Table Scripts

    At some point you may want to loop through every row in a table and perform operations based on the fields in each row. After a bit of investigation, I've found the 2 most common ways of doing it. Loop Through All Rows of a Table Using a Counter This method requires that the primary key is an integer...
    Posted to Matt Williamson's Blog (Weblog) by Matt Williamson on 03-10-2009
  • SQL Server Insert Using Identity

    While developing SQL scripts you'll probably find yourself inserting rows with identity columns at some point. You'll then probably want to obtain those newly created identity rows (generally ID columns of some sort) and want to insert new rows into other tables using those values. Give me some...
    Posted to Matt Williamson's Blog (Weblog) by Matt Williamson on 02-18-2009
Page 1 of 1 (3 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems