Add full-text index in Script Mode

Source: Internet
Author: User
-- Adding full-text indexes in script mode is not required, but sometimes Enterprise Manager cannot be used to connect to SQL Server. I have encountered this situation today. By the way, some people may need it.

 

-- Create a Fulltext catalog
Exec sp_fulltext_catalog 'catalogname', 'create'

-- Create a full-text index for the target table. If a full-text index already exists, delete it first. The uniqueindexname is the unique index name in the target table (required)
Exec sp_fulltext_table 'tablename', 'drop'
Exec sp_fulltext_table 'tablename', 'create', 'catalogname', 'uniqueindexname'

-- Add columns to the full-text index
Exec sp_fulltext_column 'tablename', 'column1 ', 'add', null, null
Exec sp_fulltext_column 'tablename', 'column2 ', 'add', null, null

-- Activate full-text index
Exec sp_fulltext_table 'tablename', 'activate'

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.