title: Change collations of all columns of all tables in SQL Server
body: <p>I imported a database with some data to compare with another database.</p>
  <p>The target database has collation <code>Latin1_General_CI_AS</code> and the source database has <code>SQL_Latin1_General_CP1_CI_AS</code>.</p>
  <p>I did change the collation of the source database in general to <code>Latin1_General_CI_AS</code> using the SQL Server Management Studio. But the tables and columns inside remains with the old collation.</p>
  <p>I know that I can change a column using:</p>
  <pre><code>ALTER TABLE [table] 
  ALTER COLUMN [column] VARCHAR(100) COLLATE Latin1_General_CI_AS
  </code></pre>
  <p>But I have to do this for all tables and all columns inside.</p>
  <p>Before I know start to write a stored procedure that reads all tables and inside all column of type <code>varchar</code> and change them in a table and column cursor loop...</p>
  <p>Does anyone know an easier way or is the only way to do this with a script running through all tables in a procedure?</p>