|
Posted by Steve on 12/07/05 11:23
> What's the essential difference between the two field types varchar and text.
I guess this refers to this <mssql_field_length> and the user notes by
"marc at NOSPAM dot durdin dot net" here: <http://uk.php.net/mssql>.
The workaround mentioned is:
-- for example, with MyVarCharField VARCHAR(1000)
SELECT CAST(MyVarCharField AS TEXT) FROM MyTable
>From the SQL Server BOL for MSSQL2000:
"...character data is stored using the char, varchar, and text data
types. Use varchar when the entries in a column vary in the number of
characters they contain, but the length of any entry does not exceeds 8
kilobytes (KB). Use char when every entry for a column has the same
fixed length (up to 8 KB). Columns of text data can be used to store
ASCII characters longer than 8 KB."
There will definitely be a performance hit when using TEXT instead of
CHAR or VARCHAR. You'll have to make some tests to see if you could
live with that.
---
Steve
Navigation:
[Reply to this message]
|