Monday, March 19, 2012

index on bit fields

Hello everyone, I'm new with SQLServer (ver. 7.0) I'm desingning some table
for a VB app I'm developing. I've noticed that I can't set up bit fields (so
me useful flags) into the definition of indexes. I'm I right or I turned som
e wrong way on?
I'm using Enterprise manager to design tables.
Thanks in advance, Giovanni.Hi Giovanni,
You can't create indexes on bit columns in SQL Server 7, although you can do
it in SQL Server 2000.
Jacco Schalkwijk
SQL Server MVP
"giovanni" <anonymous@.discussions.microsoft.com> wrote in message
news:5090C463-4AAE-49B3-A4DD-E4A2AB2BAF60@.microsoft.com...
> Hello everyone, I'm new with SQLServer (ver. 7.0) I'm desingning some
table for a VB app I'm developing. I've noticed that I can't set up bit
fields (some useful flags) into the definition of indexes. I'm I right or I
turned some wrong way on?
> I'm using Enterprise manager to design tables.
> Thanks in advance, Giovanni.|||hi giovanni,
you are right. you can not create index on BIT datatype in SQL Server 7.0 Th
is is supported in
SQL 2000. If possible change datatype to TINYINT.
Vishal Parkar
vgparkar@.yahoo.co.in|||Hi Vishal, I can change but do You think I'll have to cast datas on my VB Ap
p to convert it into a Boolean type?
thanks giovanni
-- Vishal Parkar wrote: --
hi giovanni,
you are right. you can not create index on BIT datatype in SQL Server 7.0 Th
is is supported in
SQL 2000. If possible change datatype to TINYINT.
Vishal Parkar
vgparkar@.yahoo.co.in|||Hi Giovanni,
Keep this article for your reference
SQL Server 7.0 Datatypes By Sergey Vartanyan
http://databasejournal.com/features...ticle.php/14423
61
Regards
Thirumal Reddy M
Sys Admin
www.sstil.com
>--Original Message--
>hi giovanni,
>you are right. you can not create index on BIT datatype
in SQL Server 7.0 This is supported in
>SQL 2000. If possible change datatype to TINYINT.
>--
>Vishal Parkar
>vgparkar@.yahoo.co.in
>
>.
>|||hi giovanni,
Im not sure how do you handle this data at application level but i dont thin
k you should face
any problem with it, because BIT datatype also belongs to INTEGER family
Vishal Parkar
vgparkar@.yahoo.co.in|||an index on a bit column (Or tinyInt Column with very few different values)
will be basically worthless.
Probably not a good candidate for an index.
Greg Jackson
PDX, Oregon

No comments:

Post a Comment