varchar and text

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Agoston Bejo (gusz1_at_freemail.hu)
Date: 02/08/05


Date: Tue, 8 Feb 2005 16:48:46 +0100

Hi!
I know that varchar is only able to store string data up to 8000 bytes,
whereas text up to 2 Gig or so.
Somebody told me that you cannot search in text-type fields, i.e. you cannot
use LIKE '%abc%' and things like that. I tried it (on SQL Server 7),
inserted some short text, and LIKE worked just fine. Does it work also when
some longer string inserted? Or is it only a rumor? Are there any
disadvantages of using text-type fields instead of varchar's?

Thx,
Agoston



Relevant Pages

  • Re: varchar and text
    ... > I know that varchar is only able to store string data up to 8000 bytes, ... > whereas text up to 2 Gig or so. ... > Somebody told me that you cannot search in text-type fields, ...
    (microsoft.public.sqlserver.server)
  • Re: varchar and text
    ... > I know that varchar is only able to store string data up to 8000 bytes, ... > whereas text up to 2 Gig or so. ... > Somebody told me that you cannot search in text-type fields, ...
    (microsoft.public.sqlserver.programming)
  • varchar and text
    ... I know that varchar is only able to store string data up to 8000 bytes, ... whereas text up to 2 Gig or so. ... Somebody told me that you cannot search in text-type fields, ...
    (microsoft.public.sqlserver.server)
  • Re: varchar and text
    ... You would use the Indexing Service for searching text columns. ... > I know that varchar is only able to store string data up to 8000 bytes, ... > Somebody told me that you cannot search in text-type fields, ...
    (microsoft.public.sqlserver.server)
  • Re: varchar and text
    ... You would use the Indexing Service for searching text columns. ... > I know that varchar is only able to store string data up to 8000 bytes, ... > Somebody told me that you cannot search in text-type fields, ...
    (microsoft.public.sqlserver.programming)