Microsoft Word - Sam's Teach Yourself MySQL in 21 Days - SAMS.doc
Example: SELECT COS(4) Result: -0.653644 COT(x) Returns the cotangent of x. Example: SELECT COT(5) Result: -0.29581292 COUNT(x) ...
DATE_ADD(date, INTERVAL value Type) and ADD_DATE(date, INTERVAL value Type) Adds the value to the date argument. The word INTERV ...
%y Year—2 digit %j Day of the year— numeric %a (^) Abbreviated weekday name %d (^) Day of the month— digit %r Time—12 hour clock ...
27 DAYOFWEEK(date) Returns the index of the day of the week that is given in the argument. See the following list for the correc ...
ENCRYPT(word[, seed]) Returns an encrypted string. Uses the UNIX crypt() function. The optional seed can be a 2-letter string. E ...
FLOOR(x) Returns the largest integer value that is not greater than x. The returned value is converted to a BIGINT. See CEILING( ...
"F" HOUR(time) Returns the hour given in time. Example: SELECT HOUR('11:45:01') Results: 11 IF(expression1, expression2, express ...
LAST_INSERT_ID() Returns the last sequence number of an inserted record in an AUTO_INCREMENT column. This number is stored based ...
Result: This command will load the contents of the Flowers.gif into the Picture column of the Products table. The column must ei ...
Result: "Mark" MAX(expression) Returns the maximum value of the given expression. Example: SELECT MAX(Customer_ID) FROM Customer ...
"March" NOW() Returns the current date and time. See CURTIME(), CURRENT_TIMESTAMP, and SYSDATE(). Example: SELECT NOW() Result: ...
POW(x, y) and POWER(x, y) Return the result of x raised to the power of y. Example: SELECT POWER(2,3) Result: 8 Example: SELECT ...
REPLACE(x, y, z) Returns the string x with all occurrences of y replaced with z. Example: SELECT REPLACE("The Brown Cow", "The", ...
SELECT SECOND('11:45:01') Result: 1 SEC_TO_TIME(seconds) Returns the time in hh:mm:ss format based on the number of seconds give ...
SQRT(x) Returns the square root of x. Example: SELECT SQRT(9) Result: 3 Example: SELECT SQRT(-16) Result: NULL STRCMP(string1, s ...
SUBDATE() See DATE_SUB() SYSDATE() Returns the current date and time. See also CURTIME(), NOW(), and CURRENT_TIMESTAMP(). Exampl ...
Result: "ark" Example: SELECT TRIM(BOTH "X" FROM "XXXFILE.XXX") Result: "FILE." TRUNCATE(x,y) Returns the argument x truncated t ...
VERSION() Returns the server version as a string. Example: SELECT VERSION() Results: "3.22.23b" WEEK(date [, start]) Returns the ...
You will find that MySQL is priced well below its competitors. At the time of this writing, Microsoft's SQL Server is priced at ...
Add a couple of users to the database, and try using these accounts. The easiest way to add users is to use the GRANT statement ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf