Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- POLEZNYE FUNCTIONS IN MYSQL
- directory language SQL
- USER ()-function displays login nick under which we
- are connected to MYSQL
- DATABASE ()-function displays the name of the
- database to which we are connected
- VERSION ()-displays the version of MYSQL
- ----------------------------
- ASCII (str)-returns ASCII code of first character in the
- string "str"
- CHAR (xx1, xx2 ,...)- returns a string consisting of ASCII
- codes which somvolov xx1, xx2, etc
- HEX (str)-returns the hexadecimal equivalent of 16-
- string "str".
- ----------------------------
- LENGTH (str) - Returns the length of the string "str".
- SUBSTRING (str, pos [, len])-Returns a substring of
- length len (if not specified before the end of string "str")
- characters from string "str", starting from the position
- pos.
- LOCATE (substr, str [, pos])-Returns the position of first
- occurrence of "substr" to the string "str" starting at
- position pos (unless it is specified with the beginning of
- the line "str"). If the substring "substr" in line "str" is
- missing, it returns 0.
- ----------------------------
- LOWER (str)-translates into lower case string "str" (I
- think only the Latin)
- CONCAT (param1, param2 ,...)-association substrings in
- one line.
- CONCAT_WS (sep, param1, param2 ,...)-association
- substrings in one string delimiter c "sep".
- ----------------------------
- IF (exp, ret1, ret2)-Check the condition exp if it is true
- (not 0) then returns a string ret1 but if not then returns
- a string ret2.
- ----------------------------
- expr BETWEEN min AND max-If the value of expr is
- greater than or equal to a specified value of min and
- less than or equal to a specified value max, then the
- function BETWEEN returns 1, otherwise - 0.
- ----------------------------
- AES_DECRYPT (AES_ENCRYPT ( 'string', 'bla'), 'bla')
- are often Newer bugs summary encoded and can be
- so strong do not bother using this design.
- ********************
- comments in Mysql
- # start a comment character in MySQL. Example
- SELECT pass, login FROM users # This is comment
- SELECT pass, login FROM users
- - another version of the commentary in MySQL.
- Required space after the sign. Example
- SELECT pass, login FROM users - This is comment
- / * * / comments similar SI in MySQL. The closing part
- is optional. For MySQL indeintichna gap. Example
- SELECT pass, login FROM users / * This is comment
- SELECT pass, login / * This is comment * / FROM users
- SELECT / ** / pass, login / ** / FROM / ** / users
- / *! Int * / Expansion of the previous comments. All
- prisoners in this comment will be interpreted as an SQL
- query if the number of the MySQL version is equal to
- the specified number of int after an exclamation point or
- more. Example
- SELECT pass / *! 32302, login * / FROM users
- BYE guyz....see you soon
- wait some tools...
- soon
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement