Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
24 views

Mysql

This document is a MySQL cheat sheet that provides information on MySQL data types, functions, date and time functions, mathematical functions, string functions, and other miscellaneous functions. It includes tables that list the functions categorized by type.

Uploaded by

mailrobertb
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Mysql

This document is a MySQL cheat sheet that provides information on MySQL data types, functions, date and time functions, mathematical functions, string functions, and other miscellaneous functions. It includes tables that list the functions categorized by type.

Uploaded by

mailrobertb
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MySQL Cheat Sheet

by Dave Child (DaveChild) via cheatography.com/1/cs/16/

MySQL Data Types MySQL Type Conversion MySQL String Functions (cont)

CHAR String (0 - 255) BINARY 'string' LENGTH REPEAT


VARCHAR String (0 - 255) CAST (expression AS datatype) CHAR_LENGTH REVERSE
TINYTEXT String (0 - 255) CONVERT (expression, datatype) BIT_LENGTH INSERT

TEXT String (0 - 65535) LOCATE ELT


MySQL Grouping Functions
BLOB String (0 - 65535) INSTR FIELD
AVG MAX
MEDIUMTEXT String (0 - 16777215) LPAD LCASE
BIT_AND STD
MEDIUMBLOB String (0 - 16777215) RPAD UCASE
BIT_OR STDDEV
LONGTEXT String (0 - 429496​7295) LEFT LOAD_FILE
COUNT SUM
LONGBLOB String (0 - 429496​7295) RIGHT QUOTE
GROUP_​CONCAT VARIANCE
TINYINT x Integer (-128 to 127)
MIN MySQL Date and Time Functions
SMALLINT x Integer (-32768 to 32767)
DAYOFWEEK DATE_SUB
MEDIUMINT x Integer (-8388608 to
MySQL Mathem​atical Functions
8388607) WEEKDAY ADDDATE
ABS COS
INT x Integer (-2147​483648 to DAYOFMONTH SUBDATE
214748​3647) SIGN SIN
DAYOFYEAR EXTRACT
BIGINT x Integer (-9223​372​036​854​‐ MOD TAN
MONTH TO_DAYS
775808 to 922337​203​‐ FLOOR ACOS
DAYNAME FROM_DAYS
685​477​5807) CEILING ASIN
MONTHNAME DATE_F​ORMAT
FLOAT Decimal (precise to 23 ROUND ATAN, ATAN2
QUARTER TIME_F​ORMAT
digits)
DIV COT
WEEK CURREN​T_DATE
DOUBLE Decimal (24 to 53 digits)
EXP RAND
YEAR CURREN​T_TIME
DECIMAL "​DOU​BLE​" stored as
LN LEAST
string YEARWEEK NOW
LOG, LOG2, LOG10 GREATEST
DATE YYYY-MM-DD HOUR SYSDATE
POW DEGREES
DATETIME YYYY-MM-DD MINUTE UNIX_T​IME​STAMP
POWER RADIANS
HH:MM:SS SECOND FROM_U​NIXTIME
SQRT TRUNCATE
TIMESTAMP YYYYMM​DDH​HMMSS PERIOD_ADD SEC_TO​_TIME
PI
TIME HH:MM:SS PERIOD​_DIFF TIME_T​O_SEC
ENUM One of preset options DATE_ADD
MySQL String Functions
SET Selection of preset
ASCII SUBSTRING MySQL Control Flow Functions
options
ORD MID
Integers (marked x) that are "​UNS​IGN​ED" IF NULLIF
CONV SUBSTRING_INDEX
have the same range of values but start IFNULL
from 0 (i.e., an UNSIGNED TINYINT can BIN LTRIM
have any value from 0 to 255). OCT RTRIM
HEX TRIM
CHAR SOUNDEX
CONCAT SPACE
CONCAT_WS REPLACE

By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by CrosswordCheats.com


cheatography.com/davechild/ Last updated 25th February, 2020. Learn to solve cryptic crosswords!
aloneonahill.com Page 1 of 2. http://crosswordcheats.com
MySQL Cheat Sheet
by Dave Child (DaveChild) via cheatography.com/1/cs/16/

MySQL Miscel​laneous Functions

BIT_COUNT DES_EN​CRYPT
DATABASE DES_DE​CRYPT
USER LAST_I​NSE​RT_ID
SYSTEM​_USER FORMAT
SESSIO​N_USER VERSION
CURREN​T_USER CONNEC​TION_ID
PASSWORD GET_LOCK
OLD_PA​SSWORD RELEAS​E_LOCK
ENCRYPT IS_FRE​E_LOCK
DECODE BENCHMARK

MD5 INET_NTOA
SHA1 INET_ATON
AES_EN​CRYPT FOUND_ROWS
AES_DE​CRYPT STRCMP

By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by CrosswordCheats.com


cheatography.com/davechild/ Last updated 25th February, 2020. Learn to solve cryptic crosswords!
aloneonahill.com Page 2 of 2. http://crosswordcheats.com

You might also like