MySQL Cheatsheet Loading... Database It is defined as a collection of interrelated data stored together to serve multiple applications. What is Database? MySQL Elements MySQL has certain elements that play an important role in querying a database. Literals Literals refer to a fixed data value 17 #It is a numeric literal "Harry" #It is a text literal 12.5 #It is a real literal Data Types Data types are means to identify the type of data. #Numeric INT -- Integer data type TINYINT SMALLINT MEDIUMINT BIGINT FLOAT(M,D) -- Floating point data type DOUBLE(M,D) -- Double data type also stores decimal values DECIMAL(M,D) -- Decimal data type #Data and Time DATE -- Date data type (YYYY-MM-DD) DATETIME -- It's a date and time combination (YYYY-MM-DD HH:MM:SS) TIME -- It stores time (HH:MM:SS) #String/Text CHAR(M) -- Character data type VARCHAR(M) -- Variable character data type BLOB or TEXT NULL Values If a column has no value, then it is said to be NULL Comments A comment i...
Join our blog for information about latest technology and IT.