Answers for "sql check column contains string"

SQL
5

check if string contains substring sql

Declare @mainString nvarchar(100)='Amit Kumar Yadav'  
---Check here @mainString contains Amit or not, if it contains then retrun greater than 0 then print Find otherwise Not Find  
if CHARINDEX('Amit',@mainString) > 0   
begin  
   select 'Find' As Result  
end  
else  
    select 'Not Find' As Result
Posted by: Guest on May-28-2020
0

sql query to check if column contains alphabets

SELECT * 
FROM table_name
WHERE CAST(PRIME_KEY AS STRING) RLIKE '([0-9]+[a-z]+)'
Posted by: Guest on February-02-2021

Code answers related to "sql check column contains string"

Code answers related to "SQL"

Browse Popular Code Answers by Language