CREATE TABLE Professor ( ProfessorID INT NOT NULL PRIMARY KEY, Name VARCHAR(50) NOT NULL) TYPE = InnoDB;
/* Prepare the data */ INSERT INTO Professor (ProfessorID,Name) VALUES (1,'John Jones'); INSERT INTO Professor (ProfessorID,Name) VALUES (2,'Cury Butz'); INSERT INTO Professor (ProfessorID,Name) VALUES (3,'JJ Smith');
/* Real command */
UPDATE Professor SET Name = CONCAT('Prof. ', Name) WHERE ProfessorID > 6;
Related Scripts with Example Source Code in same category :