String data types in MySQL

STRING Type

char

Format : YYYY-MM-DD
Range of values:'1000-01-01' to '9999-12-31'

Example : News_date DATE

By default MySQL store in YYYY-MM-DD format

DATETIME [fsp]

Range of value : '1000-01-01 00:00:00.000000' to '9999-12-31 23:59:59.999999' Example : News_datetime DATETIME

fsp: is the fraction of second from .000000 to .999999

TIME

Range of value : '00:00:00.000000' to '23:59:59.999999' Example : News_time TIME

fsp: is the fraction of second from .000000 to .999999

TIMESTAMP

values are stored as the number of seconds since the epoch ('1970-01-01 00:00:00' UTC)
fsp: is the fraction of second from .000000 to .999999

YEAR

Value of year is stored as YYYY.


plus2net.com



Post your comments , suggestion , error , requirements etc here .





SQL Video Tutorials










We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer