In MySQL how do i add values to a field using the value from another field? I have a current MySQL database that contains two tables (lets just say A and B). I have an ID that holds 8 characters in table B. I have a 3 integer ID in table B. I have an ID in table A that has 5 characters.
Is there any way to automatically add the table A 5char ID and the 3int ID from table B and then put them both next to each other as the ID in table B?
EX. TableA ID: 12345 + TableB ID1: 678 ---> TableB ID2: 12345678
If possible I would also like the final TableB ID2 to alter itself if either of the other TableA ID or TableB ID2 change.
Any information or answers are much appreciated, thanks! |