How I can obtain the collation of a specific table in a database? Is it possible that a table have different collation in db?
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
Just as a point of note. SSMS can show column collations when scripting out the table. You can go into Tools-> Options. Under SQL Server Object Explorer -> Scripting, there is an option to show collation when scripting out a table. You can turn this on temporarily and script out a table to see table creation code including column collations.
There is no such thing as a collation for a table.
A database has a default collation (which defaults to the collation for the server).
The default collation for the database will be applied to any column you add to a table, UNLESS you explicitly specify a collation at the column level.
Collation at the table level is on a per column basis, so it is possible to have a collation different than the database. If the collation is not defined at the column level, it defaults to the database collation setting.
SQL Server 2000:
SQL Server 2005+: