SQL 2005 collation

  • Dear ServerCentral

    Is there a simple scripting way that I can see the collation set against each table in a database.

    I am getting some conflict in that the collation set for the database is not the same for each table. So rather than open up each table I was wondering if there is a script I could use to display this collation for each table.

  • there is a default collation at the database level, which you can see in sys.databases.

    collation is not at the table level, but for each individual column. the value is visible in sys.columns.

    select

    object_name(object_id) As TableName,

    name As ColumnName,

    collation_name,

    column_id

    from sys.columns

    Order By

    object_name(object_id),

    column_id

    alan.nichol (4/16/2010)


    Dear ServerCentral

    Is there a simple scripting way that I can see the collation set against each table in a database.

    I am getting some conflict in that the collation set for the database is not the same for each table. So rather than open up each table I was wondering if there is a script I could use to display this collation for each table.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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