~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/functions/string/position.rst

  • Committer: Henrik Ingo
  • Date: 2011-08-29 12:24:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2412.
  • Revision ID: henrik.ingo@avoinelama.fi-20110829122427-bj271mhsl4cq8nv2
Updated README
 - make sure links are up to date
 - add instructions to "apt-get build-dep drizzle" before first build from source

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Position Functions
2
2
==================
3
3
 
4
 
.. _field-function:
5
 
 
6
4
FIELD
7
5
-----
8
6
 
28
26
 
29
27
Returns 0
30
28
 
31
 
.. _find-in-set-function:
32
 
 
33
29
FIND_IN_SET
34
30
-----------
35
31
 
36
32
Return the index position of the first argument within the second argument
37
33
 
38
 
.. code-block:: mysql
39
 
 
40
 
        SELECT FIND_IN_SET('2', '1,2,3,4');
41
 
                -> 2
42
 
        SELECT FIND_IN_SET('1', '123');
43
 
                -> 0
44
 
                
45
 
.. _instr-function:
46
 
 
47
34
INSTR
48
35
-----
49
36
 
52
39
.. code-block:: mysql
53
40
 
54
41
        SELECT INSTR('tacosalad', 'salad');
55
 
                -> 5
 
42
                -> 4
56
43
        SELECT INSTR('burger', 'salad');
57
44
                -> 0
58
45
 
59
 
.. _left-function:
60
 
 
61
46
LEFT
62
47
----
63
48
 
64
49
Return the leftmost number of characters as specified
65
50
 
66
 
.. code-block:: mysql
67
 
 
68
 
        SELECT LEFT('drizzled', 7);
69
 
                -> 'drizzle'
70
 
 
71
 
.. _insert-function:
72
 
 
73
51
INSERT
74
52
------
75
53
 
92
70
        SELECT INSERT('Aquatic', 3, 100, 'This');
93
71
                -> 'AqThis'
94
72
 
95
 
.. _locate-function:
96
73
 
97
74
LOCATE
98
75
------
99
76
 
100
77
Return the position of the first occurrence of substring.
101
78
 
102
 
.. code-block:: mysql
103
 
 
104
 
        SELECT LOCATE('salad', 'tacosalad');
105
 
                -> 5
106
 
        SELECT LOCATE('burger', 'salad');
107
 
                -> 0
108
 
 
109
 
.. _position-function:
110
 
 
111
79
POSITION
112
80
--------
113
81
 
114
82
A synonym for LOCATE()
 
83