Archive
MySql integer numeric types
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: 0MySQL LIMIT Clause
The 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: 12MySQL processing data in UTF8
Record 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: 1Load DataSet from xml file.
Load DataSet from xml file:
The file is called users.xml. The example structure of xml file is:
<users>
<user>
<name>My Name</name>
</user>
</users>
Code to load xml file into DataSet:
DataSet ds = new DataSet("user");
...
string filePath = "users.xml";
ds.ReadXml(filePath);
The value of the filePath is the full path to the file users.xml.
Unique visitors to post: 33