Data Types and Wild Card Characters in Microsoft SQL Server

Data Types and Wild Card Characters in Microsoft SQL Server

Data Types and Wild Card Characters in Microsoft SQL Server Part - 6
Image Credits: itprotoday.com

In this post I will explain Data Types and Wild Card Characters in Microsoft SQL Server. So let’s start.

Data Types and Wild Card Characters in Microsoft SQL Server

What are the SQL Server Data Types?

The data type of a column defines what value the column can hold: integer, character, money, date and time, binary, and so on.

There are basically two types of data types – System defined data types and user-defined data types.

  1. System Defined Data Type
  2. User-Defined Data Type

1. System Defined data types

Now we will discuss about system defined data types are mentioned below –

1. String data types

Data Types in Microsoft SQL Server

2. Number data types

3. Date data types

4. Other data types

2. User Defined data types

Now we will discuss about user-defined data types, some scripts are mentioned below to understand –

Syntax:

What are WILD CARD CHARACTERS?

With the help of some characters, we match any single character in a string comparison that produces the desired result in a query set called wild card characters. In Microsoft SQL Server, there are four types of wild card characters:

  1. Percent(%)
  2. Underscore(_)
  3. Square Brackets([])
  4. Caret(^)
  1. % (Wildcard – Character(s) to Match): It matches any string of zero or more characters. This wildcard character can be used as either a prefix or a suffix.

Syntax-

Wild Card Characters in Microsoft SQL Server

2. _Wildcard – Match One Character): It matches any single character in a string comparison operation that involves pattern matching, such as LIKE and PATINDEX.

Syntax-

3. [ ] (Wildcard – Character(s) to Match): It matches any single character within the specified range or set that is specified between the brackets. These wildcard characters can be used in string comparisons that involve pattern matching

Syntax-

4. [^] (Wildcard – Character(s) Not to Match): It matches any single character that is not within the range or set specified between the square brackets.

Syntax-

I will discuss upcoming topics in next part. So please take care of you.

Assuming this tutorial post has well-acquainted aspiring to the complete requirement. If you want to download this tutorial in PDF format file, then please – click here to download PDF.

Also requesting, if you have any ideas or suggestions for me or you need some important blogs/Videos or guidelines related to SQL Server, Excel, WordPress, SEO, Website technologies then please feel free to write me on below comment section or you can go through the Contact Page. I will definitely come back to you with your desired requirements.

Hope this tutorial post was helpful for you and you liked very well, I am happy to serve you better. If you liked really this tutorial post, please don’t forget to share on social media like – Facebook, Whatsapp, LinkedIn, Twitter, Instagram, etc.

Leave a Reply