Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

check if a string contains substring in sql code example

Example: 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

Tags:

Javascript Example

Related

mongo create admin code example bootstrap 3 center image vertically code example java sum digits of number code example spring logging framework cloud code example m5.xlarge instance type code example latex change font size outside of equation code example insert date in mysql table code example r dataframe set column names code example how to access string elements using index number in Javascript code example string.toupper in java code example how to output c++ code example laravel uri segment code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy