Advertisement
katroxcyber

Fungsion SQL

Apr 23rd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. Variable/Function Output
  2.  
  3. @@hostname Current Hostname
  4. @@tmpdir. Tept Directory
  5. @@datadir Data Directory
  6. @@version Version of DB
  7. @@VERSION_COMPILE_OS Version Operating System
  8. @@VERSION_COMPILE_MACHINE Server Os Type
  9. @@basedir Base Directory
  10. user() Current User
  11. database() Current Database
  12. SCHEMA() Current Database
  13. version() Version
  14. @@GLOBAL.VERSION Version
  15. @@VERSION_COMMENT Version
  16. schema() current Database
  17. UUID() System UUID key
  18. current_user() Current User
  19. current_user Current User
  20. system_user() Current Sustem user
  21. session_user() Session user
  22. @@GLOBAL.have_symlink Check if Symlink Enabled or Disabled
  23. @@HAVE_SYMLINK Check if Symlink Enabled or Disabled
  24. @@GLOBAL.have_ssl Check if it have ssl or not
  25. @@HAVE_OPENSSL Check if it have ssl or not
  26. @@CHARACTER_SETS_DIR Get Server Folders
  27. @@LOG_ERROR Get Server Folders
  28. @@LANGUAGE Get Server Folders
  29. @@PID_FILE Get Server Folders
  30. @@PLUGIN_DIR Get Server Folders
  31. @@SOCKET Get Server Folders
  32. @@BASEDIR Get Server Folders
  33. @@DATADIR Get Server Folders
  34. @@SLAVE_LOAD_TMPDIR Get Server Folders
  35. @@PORT Port
  36. @@WAIT_TIMEOUT Time Out Connection
  37. @@MYISAM_RECOVER_OPTIONS Recover Options
  38.  
  39.  
  40.  
  41. [+] SQL Aggregate Functions [+]
  42.  
  43. SQL aggregate functions return a single value, calculated from values in a column.
  44. Function Description
  45. AVG() Returns the average value
  46. COUNT() Returns the number of rows
  47. FIRST() Returns the first value
  48. LAST() Returns the last value
  49. MAX() Returns the largest value
  50. MIN() Returns the smallest value
  51. ROUND() Rounds a numeric field to the number of decimals specified
  52. SUM() Returns the sum
  53.  
  54. [+] SQL String Functions [+]
  55. Function Description
  56. CHARINDEX Searches an expression in a string expression and returns its starting position if found
  57. CONCAT()
  58. LEFT()
  59. LEN() / LENGTH() Returns the length of the value in a text field
  60. LOWER() / LCASE() Converts character data to lower case
  61. LTRIM()
  62. SUBSTRING() / MID() Extract characters from a text field
  63. PATINDEX()
  64. REPLACE()
  65. RIGHT()
  66. RTRIM()
  67. UPPER() / UCASE() Converts character data to upper case
  68.  
  69. [+] MySQL Date Functions [+]
  70.  
  71. The following table lists the most important built-in date functions in MySQL:
  72. Function Description
  73. NOW() Returns the current date and time
  74. CURDATE() Returns the current date
  75. CURTIME() Returns the current time
  76. DATE() Extracts the date part of a date or date/time expression
  77. EXTRACT() Returns a single part of a date/time
  78. DATE_ADD() Adds a specified time interval to a date
  79. DATE_SUB() Subtracts a specified time interval from a date
  80. DATEDIFF() Returns the number of days between two dates
  81. DATE_FORMAT() Displays date/time data in different formats
  82.  
  83. [+] SQL Null Functions [+]
  84. ISNULL()
  85. NVL()
  86. IFNULL()
  87. COALESCE()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement