RE: Selecting rows issue

2002-11-22 Thread MarkH
Use the DISTINCT keyword. SELECT DISTINCT table2.* FROM table2, table1 WHERE table2.id=table1.id -Original Message- From: Tarik Ansari [mailto:[EMAIL PROTECTED]] Sent: 22 November 2002 17:10 To: [EMAIL PROTECTED] Subject: Selecting rows issue Hello, I got two tables containing

Re: Selecting rows issue

2002-11-22 Thread DL Neil
Hello Tarik, The DISTINCT option will sort this out for you. =dn > I got two tables containing following data : > > table1 > -- > id > -- > 2 > 3 > 2 > 2 > > table2 > -- > id | label > -- > 1 | one > 2 | two > 3 | three > 4 | four > > I would like to select table2's rows th

Selecting rows issue

2002-11-22 Thread Tarik Ansari
Hello, I got two tables containing following data : table1 -- id -- 2 3 2 2 table2 -- id | label -- 1 | one 2 | two 3 | three 4 | four I would like to select table2's rows that got at less one occurrence in table1, ie (2, two) and (3, three). That I tried was the follow