MySQL Forums
Forum List  »  Newbie

Re: SELECT CONCAT Question
Posted by: Peter Brawley
Date: June 13, 2021 11:10AM

Same with respect to what?

Your `jobnumber` is a name you've given to concat(year,month,idx), so in queries you can write something like ...

select x.this,y.that, ...
from table1 xx
join table2 y y on x.year=y.year and x.month=y.month and x.idx=y.iudx
...

... to retrieve other values that depend on that primary key.

Or you can make `jobnumber` a derived column, read about that under Create table in the manual, then refer to it as if it were a single physical column.

You know, before trying to design a database for use, you need to read up on some basics of the tool you're using, eg ...

https://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch01.html

https://www.artfulsoftware.com/dbdesignbasics.html

This ain't like learning to ride a bicycle, there's a knowledge base without which you'll just make a mess that brings you trouble.

Options: ReplyQuote


Subject
Written By
Posted
June 13, 2021 10:22AM
Re: SELECT CONCAT Question
June 13, 2021 11:10AM


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.