Essential Mysql Cheat Sheet: by Via
Essential Mysql Cheat Sheet: by Via
Essential Mysql Cheat Sheet: by Via
CHAR String (0 - 255) select all columns return only 1 row matching query
TINYTEXT String (0 - 255) select some columns amend the values of a column
TEXT String (0 - 65535) SELECT col1, col2 FROM tbl; UPDATE table SET column1="val1"
BLOB String (0 - 65535) WHERE ...
select only unique records
MEDIUMTEXT String (0 - 16777215) clear all the values, leaving the table structure
SELECT DISTINCT FROM tbl WHERE
MEDIUMBLOB String (0 - 16777215) condition; TRUNCATE TABLE tbl;
Integers (marked x) that are "UNSIGNED" have RIGHT also returns non-matching records
CREATE TABLE tbl (field1, field2);
the same range of values but start from 0 (i.e., JOIN in right table
insert data into a table
an UNSIGNED TINYINT can have any value
JOIN syntax:
from 0 to 255). INSERT INTO tbl VALUES ("val1", "val2");
Concatenate CONCAT("str1","str2")
Average AVG(col)