func_str.result
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:4k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. hello 'hello' ""hello"" 'h'e'l'l'o' hel"lo hel'lo
  2. hello 'hello' ""hello"" 'h'e'l'l'o' hel"lo hel'lo
  3. hello
  4. hellomonty
  5. length('ntrb_%\')
  6. 10
  7. concat('monty',' was here ','again') length('hello') char(ascii('h'))
  8. monty was here again 5 h
  9. locate('he','hello') locate('he','hello',2) locate('lo','hello',2)
  10. 1 0 4
  11. instr('hello','he')
  12. 1
  13. position('ll' in 'hello') position('a' in 'hello')
  14. 3 0
  15. left('hello',2) right('hello',2) substring('hello',2,2) mid('hello',1,5)
  16. he lo el hello
  17. concat('',left(right(concat('what ',concat('is ','happening')),9),4),'',substring('monty',5,1))
  18. happy
  19. substring_index('www.tcx.se','.',-2) substring_index('www.tcx.se','.',1)
  20. tcx.se www
  21. substring_index('www.tcx.se','tcx',1) substring_index('www.tcx.se','tcx',-1)
  22. www. .se
  23. substring_index('.tcx.se','.',-2) substring_index('.tcx.se','.tcx',-1)
  24. tcx.se .se
  25. concat(':',ltrim('  left  '),':',rtrim('  right  '),':')
  26. :left  :  right:
  27. concat(':',trim(LEADING FROM ' left'),':',trim(TRAILING FROM ' right '),':')
  28. :left: right:
  29. concat(':',trim(' m '),':',trim(BOTH FROM ' y '),':',trim('*' FROM '*s*'),':')
  30. :m:y:s:
  31. concat(':',trim(BOTH 'ab' FROM 'ababmyabab'),':',trim(BOTH '*' FROM '***sql'),':')
  32. :my:sql:
  33. concat(':',trim(LEADING '.*' FROM '.*my'),':',trim(TRAILING '.*' FROM 'sql.*.*'),':')
  34. :my:sql:
  35. TRIM("foo" FROM "foo") TRIM("foo" FROM "foook") TRIM("foo" FROM "okfoo")
  36. ok ok
  37. insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
  38. this is a test
  39. replace('aaaa','a','b') replace('aaaa','aa','b') replace('aaaa','a','bb') replace('aaaa','','b') replace('bbbb','a','c')
  40. bbbb bb bbbbbbbb aaaa bbbb
  41. replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL')
  42. this is a REAL test
  43. soundex('') soundex('he') soundex('hello all folks')
  44. H000 H4142
  45. password('test') length(encrypt('test')) encrypt('test','aa')
  46. 378b243e220ca493 13 aaqPiZY5xR5l.
  47. md5('hello')
  48. 5d41402abc4b2a76b9719d911017c592
  49. repeat('monty',5) concat('*',space(5),'*')
  50. montymontymontymontymonty *     *
  51. reverse('abc') reverse('abcd')
  52. cba dcba
  53. rpad('a',4,'1') rpad('a',4,'12') rpad('abcd',3,'12')
  54. a111 a121 abc
  55. lpad('a',4,'1') lpad('a',4,'12') lpad('abcd',3,'12')
  56. 111a 121a abc
  57. rpad(741653838,17,'0') lpad(741653838,17,'0')
  58. 74165383800000000 00000000741653838
  59. rpad('abcd',7,'ab') lpad('abcd',7,'ab')
  60. abcdaba abaabcd
  61. rpad('abcd',1,'ab') lpad('abcd',1,'ab')
  62. a a
  63. LEAST(NULL,'HARRY','HARRIOT',NULL,'HAROLD') GREATEST(NULL,'HARRY','HARRIOT',NULL,'HAROLD')
  64. HAROLD HARRY
  65. least(1,2,3) | greatest(16,32,8) least(5,4)*1 greatest(-1.0,1.0)*1 least(3,2,1)*1.0 greatest(1,1.1,1.0) least("10",9) greatest("A","B","0")
  66. 33 4 1.0 1.0 1.1 9 B
  67. decode(encode(repeat("a",100000),"monty"),"monty")=repeat("a",100000)
  68. 1
  69. decode(encode("abcdef","monty"),"monty")="abcdef"
  70. 1
  71. reverse("")
  72. insert("aa",100,1,"b") insert("aa",1,3,"b") left("aa",-1) substring("a",1,2)
  73. aa b a
  74. elt(2,1) field(NULL,"a","b","c") reverse("")
  75. NULL 0
  76. locate("a","b",2) locate("","a",1)
  77. 0 1
  78. ltrim("a") rtrim("a") trim(BOTH "" from "a") trim(BOTH " " from "a")
  79. a a a a
  80. concat("1","2")|0 concat("1",".5")+0.0
  81. 12 1.5
  82. substring_index("www.tcx.se","",3)
  83. length(repeat("a",100000000)) length(repeat("a",1000*64))
  84. NULL 64000
  85. position("0" in "baaa" in (1)) position("0" in "1" in (1,2,3)) position("sql" in ("mysql"))
  86. 1 0 3
  87. position(("1" in (1,2,3)) in "01")
  88. 2
  89. length(repeat("a",65500)) length(concat(repeat("a",32000),repeat("a",32000))) length(replace("aaaaa","a",concat(repeat("a",10000)))) length(insert(repeat("a",40000),1,30000,repeat("b",50000)))
  90. 65500 64000 50000 60000
  91. length(repeat("a",1000000)) length(concat(repeat("a",32000),repeat("a",32000),repeat("a",32000))) length(replace("aaaaa","a",concat(repeat("a",32000)))) length(insert(repeat("a",48000),1,1000,repeat("a",48000)))
  92. 1000000 96000 160000 95000
  93. domain
  94. hello.de
  95. domain
  96. test.de