I am trying to retrieve the names from a student table starting and ending with consonants. I am trying to write
SELECT NAME
FROM STUDENT
WHERE NAME-LEFT(NAME,1) IN ('A','E','I','O','U')
AND NAME-RIGHT(NAME,1) IN ('A','E','I','O','U');
trying to omit the vowel's term, then the rest terms automatically become consonants, but I think there is an error in SQL query as I am also getting the terms that are started with vowels. How to fix this?