MySQL Pocket Reference: SQL Functions and Utilities (Pocket Reference (O'Reilly)) by George Reese (27-Jul-2007) Paperback
Rows Returns simply the desired variety of rows. If the beginning price is equipped, that many rows are skipped prior to the information is again. the 1st row is no 1 (e.g., decide upon url FROM hyperlinks restrict 5,10 returns URLs numbered five via 14). method identify ([arg_list]) In early models of MySQL, this doesn't do whatever. It used to be supplied to make uploading information from different SQL servers more straightforward. beginning with MySQL 3.22, this substatement helps you to specify a method that modifies the question consequence.
Time to the given date. the kind point so as to add might be one of many following: moment, MINUTE, HOUR, DAY, MONTH, 12 months, MINUTE_SECOND (as “minutes:seconds”), HOUR_MINUTE (as “hours:minutes”), DAY_HOUR (as “days hours”), YEAR_ MONTH (as “years-months”), HOUR_SECOND (as “hours:minutes:seconds”), DAY_MINUTE (as “days hours:minutes”) and DAY_SECOND (as “days hours:minutes:seconds”). with the exception of these time components with certain varieties, the volume needs to be an integer worth (e.g., DATE_ADD("199808-24.
Two-digit 12 months percent% A literal % personality DATE_SUB(date, period volume variety) Returns a date shaped through subtracting the given period of time from the given date. an analogous period kinds are used as with DATE_ADD (e.g., SUBDATE("1999-05-20 11:04: 23", period 2 DAY) returns 1999-05-18 11:04:23). DAYNAME(date) Returns the identify of the day of the week for the given date (e.g., DAYNAME('1998-08-22') returns Saturday). DAYOFMONTH(date) Returns the day of the month for the given date (e.g.,.
String fits string (e.g., FIELD('abe','george','john','abe','bill') returns 3). 102 | MySQL Pocket Reference FIND_IN_SET(string,set) Returns the placement of string inside set. The set argument is a chain of strings separated through commas (e.g., FIND_ IN_SET ('abe', 'george, john, abe, bill') returns 3). FLOOR(number) Returns the most important integer under or equivalent to quantity (e.g., FLOOR(5.67) returns 5). FORMAT(number,decimals) well codecs the given quantity, utilizing the given variety of.
From the default personality set, in addition to $ and _.) This rule is restricted, notwithstanding, for databases and tables, simply because those values needs to be handled as records at the neighborhood filesystem. you could, consequently, use in simple terms characters legitimate for the underlying filesystem’s naming conventions in a database or desk identify. in particular, you'll no longer use / or . in a database or desk identify. you could by no means use NUL (ASCII zero) or ASCII 255 in an identifier. MySQL five lifts those regulations. while an identifier is usually an.