I would like to know what is the length max of the type VARCHAR over
ms-sqlserver. If you don't know it, I would like to know a site where I
could find that information.
Thanks.
In SQL Server 6.x, the maximum length of a varchar is 255.
In SQL Server 7.0, the maximum length of a varchar is 8000.
This information is in the respective versions of the SQL Server Books Online
which ships with the product.
Emilio Dieguez Pazo <ep...@helia.ait.uvigo.es> wrote in message
news:38CCBFFA...@helia.ait.uvigo.es...
Almost, but not quite :-)
The row limit in SQL Server 7.0 is 8060, so you can still fit in another column
or two :-)
Thomas Dauria <tda...@bu.edu> wrote in message
news:8c3mf6$cog$1...@news3.bu.edu...
> But if it was 8000 then that would be the only field because it is also
> the row length limit... I think that deserves mentioning.
>
> tom
>
> BPMargolin <bpm...@attglobal.net> wrote:
> : Emilio,
> :>
>
>
Of course, in general, it would not be a good thing to have a declared
record length longer than the actual length that could be stored. But in
some contexts, the nature of the data might be such that you will always
be under 8060, even though you need the flexibility of having large
varchar columns.
BPMargolin wrote:
>
> Tom,
>
> Almost, but not quite :-)
>
> The row limit in SQL Server 7.0 is 8060, so you can still fit in another column
> or two :-)
>
> Thomas Dauria <tda...@bu.edu> wrote in message
> news:8c3mf6$cog$1...@news3.bu.edu...
--
Brad Aisa <ba...@NOSPAMbrad-aisa.com>
http://www.brad-aisa.com/ -- PGP public key available at:
http://pgp.mit.edu:11371/pks/lookup?search=Brad+Aisa&op=index
"The paper wall will be next to fall." -- Brad Aisa
I believe I understand what you are saying, although I also believe it is open
to misinterpretation.
SQL Server 7.0 will NOT, repeat NOT, allow one to create a table where any
individual column has a declaration greater than varchar (8000). This is very
easily confirmed by trying to create a table containing a varchar (8001) column.
Such an attempt will result in an unambiguous error message: "The size (8001)
given to the column 'c1' exceeds the maximum. The largest size allowed is 8000."
It is however true that one can declare multiple columns, each of which as
declared stays within the 8000 character size limit, yet whose cumulative total,
if completely filled, would exceed the 8060 byte row limit. This, I believe, is
the point you are making, and it is indeed a valid one. You are also correct
that while such a table can be declared, SQL Server 7.0 will absolutely enforce
the 8060 byte row limit. And again you are correct that there might be
circumstances, for example, where one has a need to have two very large varchar
columns, such that if both were filled the 8060 byte row limit would be
violated, but the database designer knows that either one OR the other column
will be populated with data, but not both. This last case will be permitted by
SS7, since at no time does any one row exceed 8060 bytes.
Brad Aisa <ba...@NOSPAMbrad-aisa.com> wrote in message
news:38E638B5...@NOSPAMbrad-aisa.com...
This was never in doubt. I clearly referred to record lengths, not
column lengths.
Well, as SQL Server, and all other databases, don't deal with records, but with
rows, I would say that there was the possibility of misinterpretation. The use
of the proper terminology precludes misinterpretation.
Brad Aisa <ba...@NOSPAMbrad-aisa.com> wrote in message
news:38E6DECA...@NOSPAMbrad-aisa.com...