Mysql Notes
Mysql Notes
Create database:
Query:
SHOW DATABASES;
Data Type:
MySQL does not have the built-in BOOLEAN or BOOL data type. To represent boolean values, MySQL
uses the smallest integer type which is TINYINT(1). In other words, BOOLEAN and BOOL are
synonyms for TINYINT(1).
MySQL String data types:
ENUM An enumeration; each column value may be assigned one enumeration member
SET A set; each column value may be assigned zero or more SET members
MySQL supported a native JSON data type since version 5.7.8 that allows you to store and manage
JSON documents more effectively. The native JSON data type provides automatic validation of JSON
documents and optimal storage format.
Table Creation:
);
Insert query:
Data
Type “Zero” Value
DATE '0000-00-00'
TIME '00:00:00'
DATETIME '0000-00-00 00:00:00'
TIMESTAMP '0000-00-00 00:00:00'
YEAR 0000