Krzysiek (st************@nospam.o2.pl) writes:
in what code-page are characters stored in MSSQL tables?
is it windows1250?
Text data can be stored in two ways in SQL Server: nchar/nvarchar/ntext
which is Unicode, and char/varchar/text which is some 8-bit encoding.
With Unicode datatypes you don't have to bother all characters are there.
With 8-bit datatypes they will be in some code page. And, yes, in your
case this could well be 1250, since this is the code page normally used
for Polish.
SQL Server have a concept of collations, and as Dan said there is a default
collation on server level, and there is also a default on database level.
But the actual collation can vary from column to column.
As Dan said, to get the default server collation, you can say:
SELECT SERVERPROPERTY('Collation')
To get the default collation for a database, you can do:
select databasepropertyex(db_name(), 'Collation')
And to see the collations for the columns in a table, use sp_help.
Once you have the collation, you can say:
select collationproperty('Collationname', 'CodePage')
to find the code page.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp