跳转到内容
主菜单
主菜单
移至侧栏
隐藏
规范/协议
协议
算法
JVM
多线程/并发
存储
AI
深度学习
工具箱
最近更改
文章分类
全部文章
WHY42
搜索
搜索
外观
登录
个人工具
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁MySQL:索引”︁的源代码
页面
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
MySQL:索引
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
=创建索引= <source lang="sql"> drop table if exists lck_tst; create table lck_tst( id int not null, name varchar(200) not null, number varchar(20) not null, type1 char(1), type2 char(2), content varchar(200), remark varchar(200) ) ENGINE=MyISAM; alter table lck_tst add primary key (id); alter table lck_tst add unique idx_number(number); alter table lck_tst add index idx_name(name); alter table lck_tst add index idx_type(type1, type2); alter table lck_tst add fulltext(content); insert into lck_tst(id, name, number, type1, type2, content, remark) values (1, 'lee', '0001', 'M', 'S', 'Stray birds of summer come to my window to sing and fly away.And yellow leaves of autumn, which have no songs, flutter and fall there with a sign.', '140Kg, 25Y/O, like music'), (2, 'zhang', '0002', 'F', 'Q', 'O Troupe of little vagrants of the world, leave your footprints in my words.', '150Kg, 26Y/O, like sport'), (3, '刘德华', '0003', 'M', 'S', 'The world puts off its mask of vastness to its lover.', '180Kg, 25Y/O, like music'), (4, '侯宝林', '0004', 'M', 'Q', 'It is the tears of the earth that keep here smiles in bloom.', '14Kg, 26Y/O, like sport'), (5, '梅葆玖', '0005', 'M', 'W', 'The mighty desert is burning for the love of a bladeof grass who shakes her head and laughs and flies away.', 'wahaha a wahaha'), (6, 'Riguz', 'Ab01', 'F', 'R', 'If you shed tears when you miss the sun, you also miss the stars.', 'kasjdslkhah asjdhjksa xhjawhejqw xjhjask'), (7, 'Linus', 'BB-2', 'F', 'R', 'The sands in your way beg for your song and your movement, dancing water. Will you carry the burden of their lameness?', '180Kg'), (8, '列夫托尔斯泰', '30x9', 'E', 'S', '跳舞着的流水呀,在你途中的泥沙,要求你的歌声,你的流动呢。你肯挟瘸足 的泥沙而俱下么?', 'shdiuowa weqwehoxz xckahwejk asjdhkjas'), (9, '马克思', '9845', 'M', 'E', '她的热切的脸,如夜雨似的,搅扰着我的梦魂', '018989yhahhhjashd'), (10, '买买提 铁木耳', '9863', 'S', 'E', '忧思在我的心里平静下去,正如暮色降临在寂静的山林中。 ', '123sser'); </source> =全文索引= <source lang="sql"> SELECT * FROM lck_tst WHERE MATCH(content) AGAINST('tears earth birds'); </source> [[Category:Database]]
返回
MySQL:索引
。
搜索
搜索
查看“︁MySQL:索引”︁的源代码
添加话题