By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,071 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,071 IT Pros & Developers. It's quick & easy.

Newbee Subselect question

P: n/a
Hi,

I have previously worked mostly with Sql Server and wonder how to write
a subselect query in mysql 4.0. What i would like to do is something
like:

select a.name, b.isbn
from author a
left outer join isbn b on b.authorid in(select id from author)

When trying to running the query i get a syntax error near (select id
from author). How do i write a subquery like "in (select id from
author)"? Please ignore the rest of the query, it's just a poor example
:-)

Regards

//Magnus

Aug 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Magnus wrote:
I have previously worked mostly with Sql Server and wonder how to write
a subselect query in mysql 4.0.


Subselects are supported from version 4.1, which means that you can't
write them with MySQL 4.0 at all (you can instead use joins in most cases).

http://dev.mysql.com/doc/mysql/en/subqueries.html
Aug 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.