Checking if column exist by code

  • I developped an application running as a standalone running MSDE SQL Server which has been installed on several PCs. We had to do some changes in the data structure and would like that when the application starts 1) Checking if some columns exists in database 2) If they don't create them.

    Is it a good practice ? How do you handle database structure change ?


    Jean-Luc
    www.corobori.com

  • I don't like to do this in code, but if you must, query the information_Schema.columns view for the table and column.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply