Re: How to solve this problem?

2006-05-09 Thread Johan Lundqvist

First I would advice you to take a closer look at:
http://dev.mysql.com/doc/refman/5.0/en/join.html

It will answer your question.

/Johan


??? wrote:

Hi

There is a schema example below: (From "A first course in database system")

Product (maker, model,type)
Pc (model, speed, ram, hd, rd, price)
Laptop (model, speed, ram, hd, screen, price)
Printer (model, color, type, price)

The statement below seems wrong based on MySQL 5.0, though it is from the 
Solutions:

(SELECT maker, model, type AS productType FROM Product)
RIGHT NATURAL OUTER JOIN
((PC FULL NATURAL OUTER JOIN Laptop) FULL NATURAL OUTER JOIN Printer);


Dose MySql support this statement? And how I can solve it?

BJUT

Peng


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to solve this problem?

2006-05-09 Thread Barry
彭一凡 schrieb:
> Hi
> 
> There is a schema example below: (From "A first course in database system")
> 
> Product (maker, model,type)
> Pc (model, speed, ram, hd, rd, price)
> Laptop (model, speed, ram, hd, screen, price)
> Printer (model, color, type, price)
> 
> The statement below seems wrong based on MySQL 5.0, though it is from the 
> Solutions:
> 
> (SELECT maker, model, type AS productType FROM Product)
> RIGHT NATURAL OUTER JOIN
> ((PC FULL NATURAL OUTER JOIN Laptop) FULL NATURAL OUTER JOIN Printer);
> 
> 
> Dose MySql support this statement? And how I can solve it?
As far as i know you can only use JOINs with ON.

So this would likely not work.

If you tell what you want to be outputted we might help find a solution.

barry

-- 
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]