List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:September 13 1999 7:32pm
Subject:Re: How to make sure ?
View as plain text  
At 13:33, 19990913, James Manning wrote:
>[ Monday September 13, 1999 ] Ben-Nes Michael wrote:
>Ben-Nes> How can i make sure that value will not return in two places 
>Ben-Nes> in the same column. (like product code - no two can exist)
>
>SELECT DISTINCT product_code FROM product_table...

This isn't quite right, because two rows could exist with the same
product code, you just wouldn't see it.  Blech.

But it might be necessary to use DISTINCT if you're joining with another
table (but probably if you need to use DISTINCT in that case, you really
ought to be using GROUP BY and some grouping function(s)).

Tim
Thread
How to make sure ?Ben-Nes Michael13 Sep
  • Re: How to make sure ?Bob Kline13 Sep
  • Re: How to make sure ?James Manning13 Sep
    • Re: How to make sure ?Thimble Smith13 Sep