in what code-page are characters stored in MSSQL tables?
is it windows1250?
--
ChrisYou can determine the instance default collation with SERVERPROPERTY:
SELECT SERVERPROPERTY('Collation')
Collation can be specified at the column, database or instance level. If
not specified when the column is created, the database default collation is
used. If no database collation is specified, then the instance collation is
used.
It is best to use the default instance collation unless you have a specific
reason to do otherwise.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Krzysiek" <stefanetNOSPAM@.nospam.o2.pl> wrote in message
news:cu2nrl$331$1@.news.onet.pl...
> Hello,
> in what code-page are characters stored in MSSQL tables?
> is it windows1250?
> --
> Chris|||Krzysiek (stefanetNOSPAM@.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, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
No comments:
Post a Comment