1

I'm working on a project where we are updating client databases from older version to newer versions of the database and the related schema.

I'm looking for a way do the following for all of the tables in the database that our program uses.

If the table doesn't exist
  create table
else
  for each column in the table
    bring the column up to date or create it

I can't seem to find a way to do this through management studio and I haven't turned anything up through Google.

Something that would either give me this option in SQL Management Studio or a program that would generate the scripts for me would be good.

Thanks.

2 Answers 2

3

You can use tools like RedGates SQL Compare or Apex SQLDiff to compare and sync your schemas. It will compare the old and new database and generate the script for you.

0

I totally agree with DaniSQL's suggestions. But I would also add that this is something you can do via PowerShell and using SQLPSX would make it less difficult.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .