Sorry Bhuvan it wont work,

COMPOSITE UNIQUE INDEX will prevent entry of rows like (group_id,user_id)

1 1
1 1

what i want to prevent is this:

1 1
1 2

did you notice the distinct inside the count?
regds
mallah.





On Saturday 05 October 2002 12:36, Bhuvan A wrote:
> > SELECT  group_id  from eyp_listing group by group_id  having 
> > count(distinct userid) > 1  ;
> >
> > always returns empty.
> >
> > can it be done with some sort of UNIQUE INDEX?
>
> Yes it can be done using UNIQUE INDEX. Create a composite unique index on
> these 2 fields and it will do the rest. For more details, try
>
> $ \h CREATE INDEX
>
> regards,
> bhuvaneswaran

-- 
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to