MySQL Forums
Forum List  »  Newbie

SELECT CONCAT Question
Posted by: Raymond Jender
Date: June 13, 2021 10:22AM

I run the following from the mysQL CLI:

mysql> SELECT CONCAT(year,month,idx) AS jobnumber FROM orderform;

The result is:

+-----------+
| jobnumber |
+-----------+
| 21060001 |
+-----------+
1 row in set (0.00 sec)

Great! But querying jobnumber from the database is NULL. I need to send this data back to the database field called 'jobnumber'. I'm assume the CONCAT AS jobnumber is not a database field, but a variable? So can I write the database using the CONCAT result "jobnumber" to a field called the same thing?

Thanks,

Ray

Options: ReplyQuote


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


Sorry, only registered users may post in this forum.

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.