Mysql Date Manipulation
Mysql Date Manipulation find out the difference between two values in a table.
Understand with Example
The Tutorial illustrate an example from Mysql Date Manipulation. To grasp this example, we create a table 'Person' with field name and data type. The createtable construct a table 'Person' with respective data type.
Query for creating table :-
Query for Inserting data into the table :-
Now Once the table 'person' is created, we insert the value into a table person. The insert into add the records or rows to the table 'Person'.
Query for viewing data from the table :-
Query for finding age using the field death and birth from the table :-
The Query below find out the field difference in age between death and birth in year. The WHERE clause restrict the records from a table on the basis of condition specified where death is not null.