Tuesday, October 19, 2010

Clone user Table with collation in SQL Server 2005

Checking collation of Cloumns

SELECT name, collation_name
FROM sys.columns
WHERE OBJECT_ID IN ( SELECT OBJECT_ID
FROM sys.objects
WHERE type = 'U'
AND name = 'reg2003AU')

Clone table structure from existing one with collation.

select reg2003AU.*
into reg2003AUabccd
from reg2003AU
where 1=2

1 comment: