MySQL Forums
Forum List  »  Newbie

Re: MYSQL left joins
Posted by: Gordon Stewart
Date: May 16, 2020 07:20PM

Peter Brawley Wrote:
-------------------------------------------------------


> I'll have a lash at feeding your requirement back
> to you in language that I can understand ... you
> want to find rows where category='account',
> specifically the reference values in those rows,
> and list all the other ca.category values where
> reference=1. Is that it? If not, please elaborate.

YES, thats correct - Though i also want the title/URL fields too. But i know they will be duplicates & can deal with that after.

> Meanwhile your note that "The Checkcode field is a
> unique field combination of reference number and
> category" flags a serious redundancy in the table
> design---the concatenated field adds zero
> information, the column should be removed. To
> enforce uniqueness on those two columns, just
> define one Unique index on them.

The Checkcode IS the index :)

why delete it, just to add another index field ?

Options: ReplyQuote


Subject
Written By
Posted
May 16, 2020 03:18AM
May 16, 2020 03:54AM
May 16, 2020 08:36AM
May 16, 2020 05:44PM
May 16, 2020 06:06PM
May 16, 2020 06:16PM
May 16, 2020 06:22PM
May 16, 2020 06:27PM
May 16, 2020 07:12PM
Re: MYSQL left joins
May 16, 2020 07:20PM
May 16, 2020 07:29PM
May 17, 2020 01:11AM
May 17, 2020 08:36AM


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.