日期:2014-05-17 浏览次数:20486 次
use testdb execute sp_fulltext_database 'enable' execute sp_fulltext_catalog 'FT_testdb','create' execute sp_fulltext_table T_orderform,'create','FT_testdb','PK__T_orderform__0EA330E9' execute sp_fulltext_column 'T_orderform','passengers','add' execute sp_fulltext_table T_orderform,'activate' execute sp_fulltext_catalog 'FT_testdb','start_full' ------------------------------------- if object_id('T_orderform') is not null drop table T_orderform go create table T_orderform(id int identity(1,1) primary key,passengers nvarchar(100)) go insert into T_orderform(passengers) select N'关傲翔|TSUNO/HISASH|殷晓磊|廖凤彪|齐林|陈彬|胡艳萍|张卫军|董长福' union all select N'董长福|FUKUMORI/KOICHI|陈斌|陈TING|胡艳萍' go select * from T_orderform where contains(passengers,N'董长福') /* id passengers ----------- ---------------------------------------------------------------- 1 关傲翔|TSUNO/HISASH|殷晓磊|廖凤彪|齐林|陈彬|胡艳萍|张卫军|董长福 2 董长福|FUKUMORI/KOICHI|陈斌|陈TING|胡艳萍 */