MySQL Forums
Forum List  »  Docs

MySQL 5.5 from MySQL 4.1.22 feature request. The query have worked.
Posted by:
Date: May 21, 2010 08:39AM

DROP TABLE IF EXISTS `node_object`;
CREATE TABLE `node_object` (
`node_id` int(22) NOT NULL default '0',
`class_id` int(22) NOT NULL default '0',
`master_id` int(22) NOT NULL default '0',
`reference_id` int(22) NOT NULL default '0',
PRIMARY KEY (`node_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


select o.node_id
from
node_object o
cross join node_object o_6
on o_6.class_id='6'
and o_6.node_id in (o_7.master_id,o_9.master_id)
left join node_object o_7
on o_7.class_id='7'
and o_7.master_id=o_6.node_id
left join node_object o_9
on o_9.class_id='9'
group by o.node_id

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL 5.5 from MySQL 4.1.22 feature request. The query have worked.
4567
May 21, 2010 08:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.