Collation Is Persisting

  • Hi

    Below is my problem, Please suggest

    Suppose I have a table Table1 in which I have following constraints

    PK-Col1,Col2,Col3,Col4

    Check not null - Col1,Col2,Col3,Col4

    And Col1,Col2,Col3,Col4 is not null

    Current collation of all column and database is- SQL_Latin1_General_CP1_CI_AS

    My Server collation is - Latin1_General_CI_AI

    Now I want to change collation of Col2. So I did following steps

    Drop Following constraint

    Check Constraint for Col2 and then PK constraints

    Alter table to change collation to Latin1_General_CI_AI

    After change I want to restore both droped constraint

    So First I alter table as below

    Alter table table1 alter column Col2 char(4) not null

    It runs successfully but now collation change to SQL_Latin1_General_CP1_CI_AS again automatically.

    What should I do

    Please help

    Thanks

    KD

  • Your database default collation is: SQL_Latin1_General_CP1_CI_AS

    Hence when you are doing Alter table second time it's taking again database default.

    I guess you can do it with SSMS with lot ease.

    HTH

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • I try That

    But its not possible until these constraints r there

    so first I drop that constraint

    and change collation it changed sucussfully

    but I as alter table to restore constraint it change again as database collation

    Can Latin1_General_CI_AI collation have not null constraint

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply