<

MySQL INSERT,UPDATE,DELETE and SELECT Queries

Different types of mysql queries insert,update,delete and select


MySQL INSERT

MySQL INSERT used to insert data in MySQL table within the database. You can insert single or multiple records using a single query.


MySQL UPDATE Syntax



INSERT INTO table_name ( field1, field2,...fieldN )  
VALUES  
( value1, value2,...valueN );  



MySQL UPDATE


MySQL UPDATE used to update data of the MySQL table within the database. It is used when you need to modify the table.


MySQL UPDATE Syntax




UPDATE table_name SET field1=new-value1, field2=new-value2  
[WHERE Clause]  



MySQL DELETE

MySQL DELETE used to delete data from the MySQL table within the database. By using delete statement, we can delete records on the basis of conditions.


MySQL DELETE Syntax



DELETE FROM table_name   
WHERE  
(Condition specified);  


MySQL SELECT

The MySQL SELECT used to fetch data from the one or more tables in MySQL. We can retrieve records of all fields or specified fields.


MySQL SELECT Syntax


SELECT expressions  
FROM tables  
[WHERE conditions];  

//for all fields

SELECT * FROM tables [WHERE conditions];  

















© copyright 2017-2022 Completedone pvt ltd.