Mysql Introduction

Mysql is a RDMBS ie Relational Database Management System.

It is the most popular RDMS used with php.

Mysql uses various storage engine .Some of them are
MyISAM,MEMORY,HEAP,MERGE,InnoDB etc .The defalut storage engine is MyISAM.

Below are the some operations which are frequently used .


Syntax : insert into tablename(column1,columan2…..) values (values1,values2…….).

alternate  syntax

insert into tablename values (values1,values2…….).

Eg :  Insert into user (name,age,sex) values (‘Manish’,’23′,’Male’)

Here table name is user, the order of column name and their values should be same and their numbers also. Here , value for name column is ‘manish’  for age its ’23′ and for sex its Male .there are 3 columns and 3 values.
Resulting table will be

Name Age Sex
Manish 23 Male

Insert into user (name,age,sex) values (‘Manish’,’23′)  , it will give an error because of column and values count mismatch