|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Select Distinct....
Hi Everone
[Q]select name from user_table where id_user in (5,25,5)[/Q] when i run the above query in query analayser in SQL Server 2000 i get the result for 2 records...i am expecting 3 records....but i think by default its taking as select distinct.Should i change some configurations in Enterprise manager to get 3 records.....how should i do that..can any one pls help me out... I am running SQL Server 2000 on Windows 2000 Pro... Rgds Surjit |
|
#2
|
||||
|
||||
|
Maybe it's that your IN clause duplicates an id number? You've got 5 twice. I doubt this is quite like the usage of DISTINCT but just that it performs an OR and figures out that it's already grabbed the record for id 5.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Select Distinct.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|