MySQL & InnoDB (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What is the difference between `DATETIME` and `TIMESTAMP` in MySQL?
junior LevelDatabases & SQLMySQL
In Simple Words:
TIMESTAMP: 4 bytes. Automatically converts values from the client's current time zone to UTC for storage, and back to local time on retrieval. Limited to the year 1970 to 2038 (Y2038 Unix epoch overflow).DATETIME: 5 bytes (in MySQL 5.6+). Stores the date and time as a literal string value without time zone awareness. Range: 1000-01-01 to 9999-12-31. Recommended for long-term audit and future scheduling.