MySQL provides types for date and time and combination of date and time. In addition, MySQL also provide timestamp data type for tracking last change on a record. If you just want to store the year without date and month, you can use YEAR data type. Here is the table which showing MySQL date and type data types:
Date and Time Types
Description
DATEA date value in ‘YYYY-MM-DD’ format
TIMEA time value in ‘hh:mm:ss’ format
DATETIMEA date and time value in ‘YYYY-MM-DD hh:mm:ss’ format
TIMESTAMPA timestamp value in ‘YYYY-MM-DD hh:mm:ss’ format
YEARA year value in YYYY or YY format

Spatial Data Types

MySQL support many spatial data types as below table which contains various kind of geometrical and geographical values.


Spatial Data Types
Description
GEOMETRYA spatial value of any type
POINTA point (a pair of X Y coordinates)
LINESTRINGA curve (one or more POINT values)
POLYGONA polygon
GEOMETRYCOLLECTIONA collection of GEOMETRY values
MULTILINESTRINGA collection of LINESTRING values
MULTIPOINTA collection of POINT values
MULTIPOLYGONA collection of POLYGON values

0 comments:

Post a Comment

 
Top
Blogger Template