DECLARE @开发者_运维技巧t TABLE(Words VARCHAR(100))
INSERT INTO @t 
    SELECT 'Stack Overflow' UNION ALL
    SELECT 'EQUATORIAL'
SELECT * FROM @t 
WHERE Words  LIKE '%[AEIOU]%'
I am getting both as the output
Words
Stack Overflow
EQUATORIAL
The desired output being EQUATORIAL
Thanks
I suppose the simplest version would be:
SELECT *
FROM @t 
WHERE Words LIKE '%A%'
AND Words LIKE '%E%'
AND Words LIKE '%I%'
AND Words LIKE '%O%'
AND Words LIKE '%U%'
... like %a% and like %e% .... is the only SQL way I know of. Is this homework?
Have you considered a CLR SQL Server function that uses a regular expression?
It is because like %[AEIOU]% is true if the word contains any one of them not all of them see Aaronaught or No Refunds for solution.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论