Deleting Rows with DELETE : Delete : Insert Delete Update SQL / MySQL


SQL / MySQL » Insert Delete Update » Delete »

 

Deleting Rows with DELETE



/* Create the table */
Drop TABLE Professor;

CREATE TABLE Professor (
   ProfessorID INT NOT NULL PRIMARY KEY,
   Name        VARCHAR(50NOT NULL)
TYPE = InnoDB;

/* Prepare the data */
INSERT INTO Professor (ProfessorID,NameVALUES (1,'John Jones');
INSERT INTO Professor (ProfessorID,NameVALUES (2,'Cury Butz');
INSERT INTO Professor (ProfessorID,NameVALUES (3,'JJ Smith');


/* Real command */
DELETE FROM Professor WHERE ProfessorID > 2;
           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

SQL / MySQL

 Navioo Insert Delete Update
» Delete