MySQL Forums
Forum List  »  General

Re: Searching on a field from multiple rows matching a groupId
Posted by: Jerry Malcolm
Date: May 21, 2019 11:37AM

CREATE TABLE IF NOT EXISTS `mytable` (
`NDX` int(11) NOT NULL AUTO_INCREMENT,
`GROUPID` int(11) NOT NULL,
`COLX` varchar(50) NOT NULL,
PRIMARY KEY (`NDX`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `mytable`
--

INSERT INTO `mytable` (`NDX`, `GROUPID`, `COLX`) VALUES
(1, 1, 'aaa bbb abc ccc'),
(2, 1, 'ddd eee fff'),
(3, 1, 'ggg xyz'),
(4, 2, 'abc hhh iii'),
(5, 2, 'jjj kkk'),
(6, 2, 'lll mmm');
COMMIT;

Options: ReplyQuote




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.