1 of SQL server: full-text search (1) 1 of SQL SERVER: full-text search (1)

Source: Internet
Author: User
SQL Server 1: full-text search (1) This chapter introduces the full-text index under SQL Server 2008 R2, which can be used for character type columns (such as varchar and text) in data) index, and full-text search and query through the index. First, we will briefly introduce the differences between regular indexes and full-text indexes. For example, OK. Next we will use the stored procedure provided by SQL Server to create a full-text index. The specific steps are as follows: (1) start the full-text processing function of the database (sp_fulltext_datebase );
(2) create a full-text directory (sp_fulltext_catalog );
(3) register the table (sp_fulltext_table) that requires full-text indexing in the full-text directory );
(4) Name of the full-text search column in the table (sp_fulltext_column)
(5) create a full-text index for the table (sp_fulltext_table );
(6) Fill in the full-text index (sp_fulltext_catalog ).

Next, we will use an example to demonstrate it step by step:

SQL Server full-text search OK, now the full-text search SQL Server Code This part has been completed. In fact, in SQL Server 2008 R2, there is no need for the above Code to operate the stored procedure to create a full-text index. It comes' Full text catalogs' , We can create a full-text index manually (the implementation process is to call the stored procedure, but it is omitted here). First, find the directory storage-> full text catalogs, create a new full text catalog, such as opening it, and select the columns to be indexed in full text. After saving the column, you can perform full text search as shown in the preceding figure. This chapter introduces the full-text index under SQL Server 2008 R2. It can index character-type columns (such as varchar and text) in data and query full-text search through indexes. First, we will briefly introduce the differences between regular indexes and full-text indexes. For example, OK. Next we will use the stored procedure provided by SQL Server to create a full-text index. The specific steps are as follows: (1) start the full-text processing function of the database (sp_fulltext_datebase );
(2) create a full-text directory (sp_fulltext_catalog );
(3) register the table (sp_fulltext_table) that requires full-text indexing in the full-text directory );
(4) Name of the full-text search column in the table (sp_fulltext_column)
(5) create a full-text index for the table (sp_fulltext_table );
(6) Fill in the full-text index (sp_fulltext_catalog ).

Next, we will use an example to demonstrate it step by step:

SQL Server full-text search OK. Now the full-text search SQL server code has been completed. In fact, in SQL Server 2008 R2, there is no need for the above Code to operate the stored procedure to create a full-text index. It comes' Full text catalogs' , We can create a full-text index manually (the implementation process is to call the stored procedure, but it is omitted here). First, find the directory storage-> full text catalogs, create a new full text catalog, such as opening it, and select the columns to be indexed in full text. After saving the column, you can perform full text search as shown in the preceding figure.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.