How can I change a table when full text search is enabled?
I have an address table where the city has an nvarchar datatype, but I want to change the nvarchar datatype to varchar. For this I write a script
ALTER TABLE Address ALTER COLUMN City varchar(50) null
but when i ran this i got an error message:
Msg 7614, Level 16, State 1, Line 1 Unable to edit or delete the City column because it is included for full text search.
So how can I resolve this error? I don't know anything about full text search.
You probably have a full text index on the table and that prevents you from changing the column with that.
So, you can try:
DROP FULLTEXT INDEX ON Address
And then try:
ALTER TABLE Address ALTER COLUMN City varchar(50) null
And then you should see what the index contains and recreate it
It would be wiser to check the contents of the full text index first before discarding it.
Also you might be better off using the following code:
ALTER FULLTEXT INDEX ON tableName DROP (ColumnName)
This will drop the full text index on that column only.