I have a table col called unique_id
which is set to NULL
by default.
How can I "create a patch" and alter the table so when the unique_id
is NULL
to generate a random code (contains sting like this EE7B35CB25D24E34D7B5DE2A)
ALTER TABLE `projects`
CHANGE `unique_id` char('24') = RAND()
COLLATE 'latin1_swedish_ci' NULL
AFTER `status`;