Select Names NOT Ending With Vowels in MS SQL Server

Introduction

In this article, We will have a look, How to select the columns results NOT ending with Vowels. In our previous articles we discussed how to select columns results starting with vowels and column results ending with vowels.

Example

As an example, we have a StudentDetails table, first lets select all the results from the table.

SELECT [StudentId]
      ,[FirstName]
      ,[LastName]
      ,[RegistrationNumber]
      ,[Degree]
      ,[CreatedDate]
      ,[CreatedBy]
  FROM [PracticalWorks].[Details].[StudentDetails] 

The above query’s result is as shown below,

Fig.1 Entire table result

Now lets select student names NOT ENDING with Vowels.

SELECT [StudentId]
      ,[FirstName]
      ,[LastName]
      ,[RegistrationNumber]
      ,[Degree]
      ,[CreatedDate]
      ,[CreatedBy]
  FROM [PracticalWorks].[Details].[StudentDetails] 
   WHERE FirstName NOT LIKE '%[aeiou]'
Fig.2 Names NOT ENDING with Vowels

Conclusion

In this article we have discussed about selecting the columns results NOT Ending with Vowels. I hope you all found this article useful. Please share your feedback in the comment section.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Built with WordPress.com.

Up ↑

%d bloggers like this: