Share this Page URL
Help

Week: 3 At a Glance > Arithmetic Operations - Pg. 539

MySQL Quick Function Reference 539 YEAR--A year in 2- or 4-digit formats (default is 4-digit). The allowable values are 1901 to 2155, and 0000 in the 4-year format and 1970-2069 if you use the 2-digit format (70-69). CHAR(M) [BINARY]--A fixed-length string that is always right-padded with spaces to the specified length when stored. M can range from 1 to 255 characters. Trailing spaces are removed when the value is retrieved. CHAR values are sorted and compared in case-insensitive fashion according to the default character set unless the BINARY keyword is included. VARCHAR(M) [BINARY]--A variable-length string. Note: Trailing spaces are removed when the value is stored. M can range from 1 to 255 characters. VARCHAR values are sorted and compared in case-insensitive fashion unless the BINARY keyword is included. TINYBLOB/TINYTEXT--A BLOB or TEXT column with a maximum length of 255 (2^8­1) characters. BLOB/TEXT--A column with a maximum length of 65,535 (2^16­1) characters. MEDIUMBLOB/MEDIUMTEXT--A BLOB or TEXT column with a maximum length of 16,777,215 (2^24­1) characters. LONGBLOB / LONGTEXT--A BLOB or TEXT column with a maximum length of 4,294,967,295 (2^32­1) characters. Arithmetic Operations Rather than hard coding mathematical operations into your Web pages, use the SQL database's arithmetic functions to do the dirty work. +--Addition