Database

This blog is for php so I will talk about these.
  • MySQL
  • MySQLi
  • PDO
There are many queries in database but we will discus about four main queries that are widely used to interact with database.

  1. INSERT
  2. SELECT
  3. UPDATE
  4. DELETE
INSERT Query:-
                          Insert query is used to insert record in database. syntax of insert query is
MySQL Code:
  1. INSERT INTO TABLE_NAME(column) VALUES(values that we are going to store)
  2. or
  3. INSERT INTO TABLE_NAME VALUES(values that we are going to store);

SELECT Query:-
                          Select query is used to fetch data from database. syntax of select query is
MySQL Code:
  1. SELECT * FROM TABLE_NAME
  2. or
  3. SELECT column_name FROM TABLE_NAME
UPDATE Query:-
                            Update query is used to update or modify saved records from database. syntax of update query is
MySQL Code:
  1. UPDATE TABLE_NAME SET column_name = "value"
DELETE Query:-
                             Delete query is used to remove the records from database. Syntax of delete query is
MySQL Code:
  1. DELETE FROM TABLE_NAME



What is MySQL ?
MySQL is a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). SQL is the most popular language for adding, accessing and maaging content in a database. It is most noted for its quick processing, proven reliability, ease and flexibility of use.