I have the following Id for my table:
SELECT CONCAT('TPR-', DATE_FORMAT(NOW(), '%Y-%m-%d-%h-%m-%s')) AS Id;
At the End, I want to add a random number start from 01-99
. How can I achieve this?
I tried the following syntax, but I want to add leading zero if the number is start from 1 - 9.
FLOOR( 1 + RAND( ) * 99 )
Need advice please.