SQL: INSERT

INSERT (Input)


The INSERT command in SQL is a DML (Data Manipulation Language) command. Other DML commands are: UPDATE and DELETE.


Example: Insert (add) one record into the vehicles table


	INSERT INTO vehicles (make, model, color)
	VALUES ('Ford','Mustang','Blue');
	

Output:

  Query OK, 1 row affected (0.01 sec)

Example: Inserting more than record into the vehicles table


	INSERT INTO vehicles (make, model, color)
	  VALUES ('Ford','Mustang','Blue');
	INSERT INTO vehicles (make, model, color)
	  VALUES ('Ford','Explorer','Red');	
	INSERT INTO vehicles (make, model, color)
	  VALUES ('Ford','Focus','Green');
	

Output:

  Query OK, 3 row affected (0.01 sec)