I need to pass a parameter for a hex color to a procedure and evaluate to make sure it is a valid hex color.
This is the regex:
select '#008000' REGEXP '^#[0-9A-F]{6}$' as `ishexcolor`;
It needs to be inserted in this procedure:
BEGIN
INSERT INTO refdata.Color(`colorCode`, `notes`)
VALUES (_colorCode, _notes);
END$$
I am new to MySQL and not familiar with the syntax. Any help?