MySql count width if statement grouped
November 21st, 2009
No comments
The following table shows the required storage and range for each of the integer types.
| Type | Bytes | Minimum Value | Maximum Value |
| (Signed/Unsigned) | (Signed/Unsigned) | ||
TINYINT |
1 | -128 |
127 |
0 |
255 |
||
SMALLINT |
2 | -32768 |
32767 |
0 |
65535 |
||
MEDIUMINT |
3 | -8388608 |
8388607 |
0 |
16777215 |
||
INT |
4 | -2147483648 |
2147483647 |
0 |
4294967295 |
||
BIGINT |
8 | -9223372036854775808 |
9223372036854775807 |
0 |
18446744073709551615 |
Unique visitors to post: 0The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must both be nonnegative integer constants.
With one argument:
SELECT * FROM tbl LIMIT 10; # Retrieve first 10 rows
With one argument, the value specifies the number of rows to return from the beginning of the result set.
With two arguments:
SELECT * FROM tbl LIMIT 2,20; # Retrieve rows from 3 to 22
With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1).
Unique visitors to post: 11Record instructions in the MySQL my.ini file for processing data in text format UTF8
[mysqld] default-character-set=utf8 default-collation=utf8_general_ci character-set-server=utf8 collation-server=utf8_general_ci init-connect='SET NAMES utf8'
[client] default-character-set=utf8
Unique visitors to post: 1