代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
MSSQL
】
一个全文检索完整的例子
作者:
Dezai.CN
/ 发布于
2011/11/22
/
797
<div><span style="color: rgb(0,0,255)">Create</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">Table</span><span style="color: rgb(0,0,0)"> testIndex <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" />( <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> id </span><strong>int</strong><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,255)">identity</span><span style="color: rgb(0,0,0)">(</span><strong>1</strong><span style="color: rgb(0,0,0)">,</span><strong>1</strong><span style="color: rgb(0,0,0)">) </span><span style="color: rgb(0,0,255)">primary</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">key</span><span style="color: rgb(0,0,0)">, <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> nm </span><strong>varchar</strong><span style="color: rgb(0,0,0)">(</span><strong>100</strong><span style="color: rgb(0,0,0)">) </span><span style="color: rgb(0,0,255)">unique</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(128,128,128)">not</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">null</span><span style="color: rgb(0,0,0)">, <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> sex </span><strong>varchar</strong><span style="color: rgb(0,0,0)">(</span><strong>10</strong><span style="color: rgb(0,0,0)">) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" />) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">create</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">UNIQUE</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">index</span><span style="color: rgb(0,0,0)"> UQ__testIndex__0DAF0CB0 <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">on</span><span style="color: rgb(0,0,0)"> testindex(nm) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">insert</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">into</span><span style="color: rgb(0,0,0)"> testindex <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> </span><span style="color: rgb(0,0,255)">select</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">aaabbb</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">m</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">union</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(128,128,128)">all</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> </span><span style="color: rgb(0,0,255)">select</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">bbb</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">w</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">union</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(128,128,128)">all</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> </span><span style="color: rgb(0,0,255)">select</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">ccc</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">w</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">union</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(128,128,128)">all</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> </span><span style="color: rgb(0,0,255)">select</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">ddd</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">m</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> <div><span style="color: rgb(0,0,0)"> 准备一组汉字记录 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,255)">insert</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">into</span><span style="color: rgb(0,0,0)"> testindex <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> </span><span style="color: rgb(0,0,255)">select</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">麦蒂未伤愈中途退出训练复出时间再度成疑</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">北京</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span></div> </div> --创建全文目录 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,0)">sp_fulltext_catalog </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">abc</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">create</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span></div> </div> --创建全文索引(‘表名‘,’创建/删除‘,’全文目录名‘,’约束名‘) <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,0)">sp_fulltext_table </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">testindex</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">create</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">abc</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">UQ__testIndex__0DAF0CB0</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span></div> </div> --添加列到全文索引(‘表名‘,’列名‘,’添加/删除‘) <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,0)">sp_fulltext_column </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">testindex</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">nm</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">add</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> </div> --建立全文索引 --activate,是激活表的全文检索能力,也就是在全文目录中注册该表 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,255)">execute</span><span style="color: rgb(0,0,0)"> sp_fulltext_table </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">testindex</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">activate</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span></div> </div> --填充全文索引目录 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,255)">execute</span><span style="color: rgb(0,0,0)"> sp_fulltext_catalog </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">abc</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">start_full</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span></div> </div> --检查全文目录填充情况 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,255)">While</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,255)">fulltextcatalogproperty</span><span style="color: rgb(0,0,0)">(</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">abc</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">populateStatus</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">)</span><span style="color: rgb(128,128,128)"><></span><strong>0</strong><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">begin</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,128,128)">--</span><span style="color: rgb(0,128,128)">如果全文目录正处于填充状态,则等待30秒后再检测一次</span><span style="color: rgb(0,128,128)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">waitfor</span><span style="color: rgb(0,0,0)"> delay </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">0:0:30</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">end</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> </div> --全文目录填充完成后,即可使用全文目录检索 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,255)">SELECT</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(128,128,128)">*</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">FROM</span><span style="color: rgb(0,0,0)"> testindex </span><span style="color: rgb(0,0,255)">WHERE</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">CONTAINS</span><span style="color: rgb(0,0,0)">(nm, </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">麦蒂</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img id="_63_420_Open_Image" alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" /></span><span id="_63_420_Open_Text"><span style="color: rgb(0,128,128)">/*</span><span style="color: rgb(0,128,128)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />id nm sex <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />----------- --------------------------------------------- ------------------------------------------------ ---------- <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />5 麦蒂未伤愈中途退出训练复出时间再度成疑 北京 <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />(所影响的行数为 1 行) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" /></span><span style="color: rgb(0,128,128)">*/</span></span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> </div> 再次插入新的数据, <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">insert</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">into</span><span style="color: rgb(0,0,0)"> testindex <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> </span><span style="color: rgb(0,0,255)">select</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">麦蒂未伤愈中途退出训练复出时间再度成疑12121</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">北京</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">SELECT</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(128,128,128)">*</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">FROM</span><span style="color: rgb(0,0,0)"> testindex </span><span style="color: rgb(0,0,255)">WHERE</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">CONTAINS</span><span style="color: rgb(0,0,0)">(nm, </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">麦蒂</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,128,128)">--</span><span style="color: rgb(0,128,128)">---这个时候进行select实际上得不到理想的结果,还是老数据,没有增加的这一条</span><span style="color: rgb(0,128,128)"> <img id="_191_548_Open_Image" alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" /></span><span id="_191_548_Open_Text"><span style="color: rgb(0,128,128)">/*</span><span style="color: rgb(0,128,128)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />id nm sex <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />----------- --------------------------------------------- ------------------------------------------------ ---------- <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />5 麦蒂未伤愈中途退出训练复出时间再度成疑 北京 <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />(所影响的行数为 1 行) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" /></span><span style="color: rgb(0,128,128)">*/</span></span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> </div> --填充全文索引目录 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,255)">execute</span><span style="color: rgb(0,0,0)"> sp_fulltext_catalog </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">abc</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">start_full</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> </div> --检查全文目录填充情况 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,255)">While</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(255,0,255)">fulltextcatalogproperty</span><span style="color: rgb(0,0,0)">(</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">abc</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">populateStatus</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">)</span><span style="color: rgb(128,128,128)"><></span><strong>0</strong><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">begin</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,128,128)">--</span><span style="color: rgb(0,128,128)">如果全文目录正处于填充状态,则等待30秒后再检测一次</span><span style="color: rgb(0,128,128)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">waitfor</span><span style="color: rgb(0,0,0)"> delay </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">0:0:30</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">end</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> </div> --重新填充后就会有想要的结果 了 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,255)">SELECT</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(128,128,128)">*</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">FROM</span><span style="color: rgb(0,0,0)"> testindex </span><span style="color: rgb(0,0,255)">WHERE</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">CONTAINS</span><span style="color: rgb(0,0,0)">(nm, </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">麦蒂</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span><span style="color: rgb(0,0,0)"> <img id="_65_568_Open_Image" alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" /></span><span id="_65_568_Open_Text"><span style="color: rgb(0,128,128)">/*</span><span style="color: rgb(0,128,128)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />id nm sex <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />----------- ---------------------------------------------------------------------------------------------------- ---------- <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />6 麦蒂未伤愈中途退出训练复出时间再度成疑12121 北京 <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />5 麦蒂未伤愈中途退出训练复出时间再度成疑 北京 <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" />(所影响的行数为 2 行) <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" /></span><span style="color: rgb(0,128,128)">*/</span></span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> </div> --清理现场 <div style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 4px; background-color: rgb(230,230,230); padding-left: 5.4pt; width: 659px; padding-right: 5.4pt; word-break: break-all; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 4px"> <div><img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /><span style="color: rgb(0,0,0)">sp_fulltext_table </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">testindex</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">drop</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" />sp_fulltext_catalog </span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">abc</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)">,</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(255,0,0)">drop</span><span style="color: rgb(255,0,0)">'</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">go</span><span style="color: rgb(0,0,0)"> <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span><span style="color: rgb(0,0,255)">drop</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">table</span><span style="color: rgb(0,0,0)"> testIndex <img alt="" align="top" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" /></span></div> </div> </span></div> <div></div>
试试其它关键字
全文检索
同语言下
.
SQL查询 多列合并成一行用逗号隔开
.
查看存储过程修改时间,最近执行时间
.
设置手动批量删除数据库相关进程
.
获取某个表中特定字段的所有字符串形式
.
SQL 如何去除重复的字符串
.
怎么去掉一个字段中的重复数据
.
String 去除空格 回车 换行 水平制表符
.
SQL查询和替换含有回车,空格,TAB
.
SQL SERVER 查询每日新增用户数量、次留数量
.
判断两个字符串是否存在相同的内容
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
Dezai.CN
贡献的其它代码
(
4037
)
.
多线程Socket服务器模块
.
生成随机密码
.
清除浮动样式
.
弹出窗口居中
.
抓取url的函数
.
使用base HTTP验证
.
div模拟iframe嵌入效果
.
通过header转向的方法
.
Session操作类
.
执行sqlite输入插入操作后获得自动编号的ID
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3