Using Filter Settings Option in SQL Server

Introduction

In SQL Server, you can filter records in many ways. For example, where, like, etc. In this article, I provide a quick overview of how to use Filter Settings in SQL Servers.

Filter Settings Option in SQL Server

The Filter Setting option is very useful when you have many related tables, Stored Procedures and you're only interested in a specific set of them. So let's look at a practical example of how to use the Filter Setting in SQL Server. 

This example is in SQL Server Management Studio.

Now select a table and right-click on it. Select "Table Folder," then right-click, choose a filter, and then "Filter settings."

Filter-Setting-in-SQL-Server1.jpg

Now click "Filter Settings," and the Filter Settings dialog box will open.

Filter-Setting-in-SQL-Server2.jpg

The Filter Settings window shown above contains a table with three fields.

  1. Property- Displays the property to filter, such as Name, schema, Owner, and Creation Date.

  2. Operator- Select how the filter applies the value to the property.

  3. Value- Type the value to compare to the property.

Operator with Name, Schema Property

There are the following options.

Filter-Setting-in-SQL-Server3.jpg

  1. Equals- The filter shows items where the property and the value are an exact match.
  2. Contains- The filter shows items where the property contains the value. The property may contain other text.
  3. Does not contain- The filter shows items where the property does not contain the value.

Operator with Owner Property

There are the following options:

Filter-Setting-in-SQL-Server4.jpg

  1. Equals- The filter shows items where the property and the value are an exact match.
  2. Does not equal- The filter shows items where the property and value are not exactly matched.

Operator with Creation Date Property

There are the following options:

Filter-Setting-in-SQL-Server5.jpg

  1. More significant than- Available for dates, this filter shows items whose date is after the value provided.
  2. Greater than or equal- Available for dates, this filter shows items whose date contains or is after the value provided.
  3. Between- Available for dates, this filter shows items whose date is between the two dates provided. Select "Between" and press TAB to add another row allowing entry of the second date.
  4. Not between- Available for dates; this filter shows items whose date is before or after two dates provided. Select "Not Between" and tab out of the Operator column to add another row allowing entry of the second date.

Suppose you want to search the table according to name, such as "registration."

Filter-Setting-in-SQL-Server6.jpg

Now click on the "OK" button. And click on the + sign to expand the table folder. It will show the search result related to the registration tables.

Filter-Setting-in-SQL-Server7.jpg

Similarly, you can search for a Stored Procedure.

Conclusion

This article taught us how to use Filter Settings Option in SQL Server.


Similar Articles