| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Steve Meyers | Date: | November 10 2001 4:13pm |
| Subject: | Re: Beginner SQL Question | ||
| View as plain text | |||
On Sat, 2001-11-10 at 05:53, John Morton wrote: > Hi, > > Can someone tell me why this will not work, please > > SELECT * FROM tbl1 WHERE column =(SELECT * FROM tbl2 WHERE intcolumn = > 15); > There are no subselects in MySQL (yet). However, they're usually a bad idea anyway, which is why it's never been such a big rush to get them in. In this case, you'd be better served by a join. Try: SELECT tbl1.* FROM tbl1, tbl2 WHERE tbl1.column = tbl2.column AND tbl2.intcolumn = 15; Steve Meyers
| Thread | ||
|---|---|---|
| • Beginner SQL Question | John Morton | 10 Nov |
| • Re: Beginner SQL Question | Carl Troein | 10 Nov |
| • Re: Beginner SQL Question | Steve Meyers | 10 Nov |
| • Re: Beginner SQL Question | Bruce Ferrell | 10 Nov |
| • Re: Beginner SQL Question | Shankar Unni | 10 Nov |
| • Re: Beginner SQL Question | Nguyen Trong Phuc | 10 Nov |
| • Re: Beginner SQL Question | Nguyen Trong Phuc | 10 Nov |
| • Re: Beginner SQL Question | Shankar Unni | 10 Nov |
| • Re: Beginner SQL Question | Nguyen Trong Phuc | 10 Nov |
