Forum Discussion
rozeboosje
Mar 28, 2025Tin Contributor
SSMS "Intellisense" behaviour is driving me demented
This behaviour is doing my head in and I'm hoping that there is a simple way to change it?Just to give you an example, I am starting to write a little query to check the status of FullText Indexes on...
Ronan_pr
Mar 30, 2025Copper Contributor
This behavior you're describing is known as "Auto-Complete" or "Intellisense" in SQL Server Management Studio (SSMS). It's designed to provide suggestions for column names based on the alias you've used.
The reason this behavior is causing issues in your case is because when you start typing an alias, SSMS assumes it's incomplete and tries to auto-complete it with a default column name. In this case, it defaults to "SOUNDEX".
To disable this behavior without losing Intellisense altogether, you can use the following methods:
1. **Disable Auto-Complete on specific columns:**
You can disable Auto-Complete for individual columns by right-clicking on the column in Object Explorer and selecting "Properties". In the "Column Properties" dialog box, uncheck the "Auto-complete" checkbox.
Alternatively, you can also do this in your query editor:
```sql
SELECT [SO].[name] AS [SO_name],
[FI].object_id
FROM sys.objects [SO] inner join sys.fulltext_indexes [FI] on [FI].object_id = [SO].object_id
```
In the above code, I've explicitly aliased the columns to avoid auto-completion.
2. **Disable Auto-Complete globally:**
If you want to disable Auto-Complete for all tables and aliases in SSMS, you can use the following script:
```sql
CREATE TABLE #tempTable (name sysname)
GO
INSERT INTO #tempTable SELECT 'test' FROM sys.objects
SELECT * FROM #tempTable [SO] inner join sys.fulltext_indexes [FI] on [FI].object_id = [SO].object_id
```
However, this will disable Auto-Complete for all tables in the database.
3. **Use `AS` instead of `[ ]`:**
Another way to avoid auto-completion is by using double quotes (`"`) instead of square brackets (`[]`). Double quotes are not automatically expanded like square brackets are.
```sql
SELECT `"SO".name, [FI].object_id
FROM sys.objects "SO" inner join sys.fulltext_indexes FI on FI.object_id = "SO".object_id
```
Please note that using double quotes might not work if your object names contain special characters or spaces.
4. **Use an alias for the table:**
You can also use a different alias for the table to avoid auto-completion:
```sql
SELECT [alias_name] AS [SO],
[FI].object_id
FROM sys.objects alias_name inner join sys.fulltext_indexes FI on FI.object_id = alias_name.object_id
```
Replace `[alias_name]` with your actual alias.