title: mySQL - Get Unique ID
body: <p>I have a table (TransTbl) that consists of 2 fields (Transaction ID &amp; Transaction Date).</p>
  <p>Examples of the transaction ID are 202101, 202102, 202103, etc. It is constructed using current year + maximum record count in TransTbl.</p>
  <p>As the table is accessed by many users at the same time, there is a possibility that the maximum record count may not be unique. (E.g. same transaction ID for different records).</p>
  <p>Is there any way to avoid the above situation as each transaction ID should be unique? Thanks for any suggestions.</p>