Skip to content
Shaikh Shahid
Shaikh Shahid

Software Engineering and Personal Blog

  • About Me
  • Books and Publications
  • Resume
Shaikh Shahid

Software Engineering and Personal Blog

SQL Query to Check if Name Begins and Ends with Vowels

Shaikh Shahid, January 9, 2023

Here is a SQL query to check if the name begins and ends with vowels. Assuming you are running this in a MySQL database engine.

SELECT NAME
FROM USERS
WHERE NAME RLIKE '^[AEIOU].*[aeiou]$'

Here we are using RLIKE operator to run a regular expression against a column. The regular expression contains the check against the first and last characters with the vowels alphabet in both capital and small letters.

It would be best if you had the USERS table in your database and data containing some names to run the query.

 

Database

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Artificial Intelligence (4)
  • Database (2)
  • Generative AI (2)
  • AWS (1)
  • GoLang (1)

Tags

  • Artificial Intelligence (3)
  • aws (1)
  • firehose (1)
  • GenAI (1)
  • GenerativeAI (1)

Year

  • 2024 (3)
  • 2023 (5)
  • 2022 (5)

Recent Posts

  • Pushing Data to Amazon Kinesis Firehose using GoLang SDK
  • Getting Started with Gemini Flash Model
  • 10 ChatGPT Prompts to Boost Developer Productivity
  • Building Email Spam Detection Model in Python
  • API in Go using Gin Framework

Recent Comments

No comments to show.

Archives

  • June 2024
  • May 2024
  • September 2023
  • February 2023
  • January 2023
  • December 2022

Categories

  • Artificial Intelligence
  • AWS
  • Database
  • Generative AI
  • GoLang
  • Machine Learning
©2025 Shaikh Shahid | WordPress Theme by SuperbThemes