1、_rowid
类似Oracle的rowid
mysql> select _rowid rowid,t.* from city t limit 10; +-------+----+----------------+-------------+---------------+------------+ | rowid | ID | Name | CountryCode | District | Population | +-------+----+----------------+-------------+---------------+------------+ | 1 | 1 | Kabul | AFG | Kabol | 1780000 | | 2 | 2 | Qandahar | AFG | Qandahar | 237500 | | 3 | 3 | Herat | AFG | Herat | 186800 | | 4 | 4 | Mazar-e-Sharif | AFG | Balkh | 127800 | | 5 | 5 | Amsterdam | NLD | Noord-Holland | 731200 | | 6 | 6 | Rotterdam | NLD | Zuid-Holland | 593321 | | 7 | 7 | Haag | NLD | Zuid-Holland | 440900 | | 8 | 8 | Utrecht | NLD | Utrecht | 234323 | | 9 | 9 | Eindhoven | NLD | Noord-Brabant | 201843 | | 10 | 10 | Tilburg | NLD | Noord-Brabant | 193238 | +-------+----+----------------+-------------+---------------+------------+ rows in set (0.00 sec) mysql>
2、查看表结构
mysql> show create table tG; *************************** 1. row *************************** Table: t Create Table: CREATE TABLE `t` ( `a` int(10) unsigned DEFAULT NULL, `b` int(10) unsigned DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 1 row in set (0.00 sec) ERROR: No query specified mysql> desc t; +-------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+------------------+------+-----+---------+-------+ | a | int(10) unsigned | YES | | NULL | | | b | int(10) unsigned | YES | | NULL | | +-------+------------------+------+-----+---------+-------+ 2 rows in set (0.00 sec) mysql>
3、hex函数
4、SQL_MODE:SQL模式
5、MySQL中的函数
1》cast:强制转换
2》