I am using SQL Server Management Studio and need to convert all VARCHAR
columns to NVARCHAR
. Is there a tool or something similar to do the conversion in one or few steps? It should be applied to different databases.
Addition:
Excuse me, but is it possible that you gave me a script to convert NVARCHAR to VARCHAR? I need it the other way round. Also when I run the script which was produced by your script it gave me the error
Meldung 102, Ebene 15, Status 1, Zeile 1
Falsche Syntax in der Nähe von 'GO'.
multiple times. Actually I thought that the solution your script produce, to simply alter the tables doesnt work when there are constraints related to tables. Thats why I asked whether there is a tool that can do this, because I thought a simple script has restrictions.
Best Answer
no tool needed just some good old TSQL code.
This will generate all the statements.