1
# Copyright (C) 2008-2009 Sun Microsystems, Inc. All rights reserved.
2
# Use is subject to license terms.
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; version 2 of the License.
8
# This program is distributed in the hope that it will be useful, but
9
# WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
# General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
19
select | select | select | select | select |
20
dml | dml | dml | dml | dml |
22
select | select | select | select | select |
23
dml | dml | dml | dml | dml |
25
select | select | select | select | select |
26
dml | dml | dml | dml | dml |
32
update | insert | delete ;
35
SELECT * FROM _table where order_by limit;
39
WHERE _field sign value |
40
WHERE _field BETWEEN value AND value ;
41
# WHERE _field IN ( value , value , value , value , value , value ) ;
44
> | < | = | >= | <> | <= | != ;
47
ORDER BY _field , `pk` ;
50
LIMIT _digit | LIMIT _tinyint_unsigned | LIMIT 65535 ;
53
INSERT INTO _table ( _field , _field ) VALUES ( value , value ) ;
56
int_update | char_update ;
59
UPDATE _table SET int_field = int_value where order_by limit;
62
UPDATE _table SET char_field = char_value where order_by limit;
65
DELETE FROM _table where order_by LIMIT digit ;
67
transaction: START TRANSACTION | COMMIT | ROLLBACK ;
70
ALTER ONLINE TABLE _table DROP KEY letter |
71
ALTER ONLINE TABLE _table DROP KEY _field |
72
ALTER ONLINE TABLE _table ADD KEY letter ( key_field ) |
73
ALTER ONLINE TABLE _table ADD KEY letter ( key_field ) ;
76
_english | _digit | _quid | _digit ;
79
_digit | _tinyint_unsigned | 20 | 30 | 50 | 100 ;
82
_digit | 10 | 20 | 30 | 50 | 100 | 250 ;
85
_letter | _english | _quid ;
87
# Use only indexed fields:
90
char_field | int_field ;
93
char_key_field | int_field ;
96
`col_char_10` | `col_char_10_key` | `col_char_10_not_null` | `col_char_10_not_null_key` |
97
`col_char_1024` | `col_char_1024_key` | `col_char_1024_not_null` | `col_char_1024_not_null_key` |
98
`col_text_not_null` | `col_text_not_null_key` | `col_text_key` | `col_text` ;
101
`col_int` | `col_int_key` | `col_int_not_null_key` | `col_int_not_null` |
102
`col_bigint` | `col_bigint_key` | `col_bigint_not_null` | `col_bigint_not_null_key` ;
105
# we have this rule to apply a length to blob columns used in a key
106
`col_char_10` | `col_char_10_key` | `col_char_10_not_null` | `col_char_10_not_null_key` |
107
`col_char_1024` | `col_char_1024_key` | `col_char_1024_not_null` | `col_char_1024_not_null_key` |
108
`col_text_not_null`(small_int_value) | `col_text_not_null_key`(small_int_value) | `col_text_key`(small_int_value) | `col_text`(small_int_value) ;