MySQL_SELECT_INSERT_UPDATE_DELETE

Table of Contents

The MySQL SELECT Statement

The MySQL SELECT Statement

The MySQL SELECT Syntax

SELECT column1, column2, ... FROM table_name;

The MySQL SELECT Example1

SELECT * FROM table_name;

The MySQL SELECT Example2

SELECT CustomerName, City, Country FROM Customers;

INSERT INTO Statement

The INSERT INTO statement is used to insert new records in a table.

INSERT INTO Syntax

INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...);

INSERT INTO Example

INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');

MySQL UPDATE Statement

The UPDATE statement is used to modify the existing records in a table.

MySQL UPDATE Syntax

UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition;

MySQL UPDATE Example

UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition;

MySQL DELETE Statement

The DELETE statement is used to delete existing records in a table.

MySQL DELETE Syntax

DELETE FROM table_name WHERE condition;

MySQL DELETE Example

DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste';

Document

Document in project

You can Download PDF file.

Refference