complete novice to mysql but i'm having problems finding sources online that explain my problem. Essentially I need to add a constraint to the videoCode row where the identifier is a code in the form of XX## where the X are letters and the # are numbers.
Any help would be greatly appreciated.
CREATE TABLE videoTable(
videoID INT,
channelID INT,
videoTitle VARCHAR(255) NOT NULL,
videoPostedDate DATE NOT NULL,
videoTags VARCHAR(255),
noViews INT NOT NULL,
videoCode VARCHAR(4) NOT NULL (ADD CONSTRAINT)
PRIMARY KEY (videoID),
FOREIGN KEY (channelID) REFERENCES channelTable(channelID)
);