|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
T-SQL...How to set column collation to database default?Hi,
Does anyone know the T-SQL code I need to set the collation of a column to the database default? Following books online, I have tried: ALTER <TABLENAME> ALTER <COLUMNNAME> COLLATE DEFAULT GO but this doesn't seem to be correct. I'd be grateful for any assistance! Many thanks. TWM (throat.wobbler.mangr***@gmail.com) writes:
> Does anyone know the T-SQL code I need to set the collation of a column CREATE TABLE #a (i varchar(12) NOT NULL)> to the database default? > > Following books online, I have tried: > > ALTER <TABLENAME> > ALTER <COLUMNNAME> > COLLATE DEFAULT > GO > > but this doesn't seem to be correct. I'd be grateful for any > assistance! ALTER TABLE #a ALTER COLUMN i varchar(12) COLLATE database_default NOT NULL -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp |
|||||||||||||||||||||||