MySQL Tutorial/Data Types/FULLTEXT

Материал из SQL эксперт
Перейти к: навигация, поиск

FULLTEXT

mysql>
mysql> CREATE TABLE myTable
    -> (
    ->    OrderID SMALLINT UNSIGNED NOT NULL,
    ->    ModelID SMALLINT UNSIGNED NOT NULL,
    ->    Name VARCHAR(40),
    ->    PRIMARY KEY (OrderID),
    ->    FULLTEXT (Name)
    -> );
Query OK, 0 rows affected (0.05 sec)
mysql>
mysql> desc myTable;
+---------+----------------------+------+-----+---------+-------+
| Field   | Type                 | Null | Key | Default | Extra |
+---------+----------------------+------+-----+---------+-------+
| OrderID | smallint(5) unsigned | NO   | PRI |         |       |
| ModelID | smallint(5) unsigned | NO   |     |         |       |
| Name    | varchar(40)          | YES  | MUL | NULL    |       |
+---------+----------------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
mysql>
mysql> drop table myTable;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql>