Here I will teach you about MYSQL syntax.
MYSQL is mostly used by web developers use MYSQL inside their language to build applications that access data in a database.
Database work on four fundamentals.
- Read Data From Database - SELECT
- Insert new data into Database - INSERT
- Update exist data into Database - UPDATE
- Delete Data from Database - DELETE
This four fundamental referred to as CRUD (Create, Read, Update, Delete).
The MYSQL SELECT Syntax
SELECT column-names FROM table-names WHERE conditions ORDER BY sort-order
SELECT name, surname, email, city FROM users WHERE email = 'firstname.lastname@example.org' ORDER BY name
The MYSQL INSERT Syntax
INSERT table-name (column-names) VALUES (column-values)
INSERT users (name, surname, email, city) VALUES ('Dharmesh', 'Chauhan', 'email@example.com', 'Rajkot')
The MYSQL UPDATE Syntax
UPDATE tableName SET columnName = columnValue WHERE condition
UPDATE users SET city = 'Ahemdabad' WHERE id = 3908
The MYSQL DELETE Syntax
DELETE table-name WHERE condition
DELETE users WHERE email = 'firstname.lastname@example.org'
I hope it can helpful for you.
Thanks for read.
We always thanks to you for reading our blogs.
Dharmesh Chauhan(Swapinfoway Founder)
We Are Also Recommending You :
- Select Data From Database Table Query
- Laravel 6 installation with MongoDB Database
- MongoDB Database Installation
- How To Change ENUM DataType Without Losing Data Laravel Migration
- ERROR: database "laravel" is being accessed by other users DETAIL: There is 1 other session using the database.
- The Syntax of MySQL
- Postgres Database Export
- Create Database In MYSQL Using PHP Script Example
- [FIXED] Unknown Collation: utf8mb4_0900_ai_ci In MYSQL
- How To Install MongoDB In Ubuntu