/* Open Full-text Indexing support to start SQL Server full-Text Search service * *
Execute sp_fulltext_database ' Enable '
/* Create a Full-text Catalog * *
EXEC sp_fulltext_catalog ' ft_testdata ', ' CREATE '
/* Set up Full-text index data element/*
EXEC sp_fulltext_table ' Hc_book_book ', ' CREATE ', ' ft_testdata ', ' pk_hc_book_bookinfo '
/* Add a column name that supports Full-text indexing.
EXEC sp_fulltext_column ' Hc_book_book ', ' bookname ', ' Add '
EXEC sp_fulltext_column ' Hc_book_book ', ' bookisbn ', ' Add '
/* Create (Activate) Full-text index for table * *
EXEC sp_fulltext_table ' Hc_book_book ', ' activate '
/* Start full Full population of full-text catalogs * *
EXEC sp_fulltext_catalog ' ft_testdata ', ' start_full '
/* Verify the progress of the Full-text catalog population.
Select FullTextCatalogProperty (' Ft_testdata ', ' populatestatus ')
SELECT * FROM Hc_book_book WHERE CONTAINS (bookname, ' Java ')
The following are more detailed steps
1, view the status of the current database
SELECT databaseproperty (' pubs ', ' isfulltextenabled ')
2, open fulltext function
Sp_fulltext_databse ' Enable '
Turn off this feature
Sp_fulltext_databse ' Disable '
3, the establishment of a unique index.
In the Modify table interface, the right mouse button, select Index/keys ...
Select the field in columns, type to select the unique Key.
4, the next can be defined Full-text search, the following figure to choose Define Full-text Index ...
Next is the wizard interface, follow the wizard step-by-step, it will not be wrong!
Select the unique Index that you just defined.
Select the fields you want to use for full-text retrieval.
I do not know this for a while, next time I understand to add. )
Select a directory
Create a Schedule
Full-Text search completed, click Finish to build.
began to build.
5. Start Full Population
Summary: we are in the SQL Server under a database of a (some) data table for Full-text search settings, and then with the system's Full-text search settings, you can this (some) table for Full-text search.