Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql where contains

SELECT * FROM mytable
WHERE column1 LIKE '%word1%'
   OR column1 LIKE '%word2%'
   OR column1 LIKE '%word3%'
Comment

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  
Comment

sql where contains part of string

-- To find an exact string
SELECT * FROM [table] WHERE [field] LIKE '%stringtosearchfor%'.
Comment

PREVIOUS NEXT
Code Example
Sql :: what is intersect in sql 
Sql :: create function postgresql 
Sql :: how to connect to postgres 
Sql :: Write an SQL query to fetch worker names with salaries = 50000 and <= 100000. 
Sql :: generate random & unique mysql string 
Sql :: alter column to not null with default value sql server 
Sql :: SQL Server query to get data for a particular date and time 
Sql :: POSTGRES INSERT INTO TABLE VALUE FROM OTHER TABLE 
Sql :: unique in sql server 
Sql :: Grant privileges of databse to user 
Sql :: group by por mes sql mysql 
Sql :: right join sql 
Sql :: mysql update command 
Sql :: sql view index 
Sql :: sql distinct clause 
Sql :: oracle grant directory 
Sql :: Mysql Selected All Duplicate Rows 
Sql :: sql row having max 
Sql :: graphql 
Sql :: mysql mediumtext 
Sql :: sql join on comma separated field 
Sql :: SQL Query to delete all the tables in a database 
Sql :: between date in sql server 
Sql :: partition-by 
Sql :: delete table sqlite 
Sql :: How do I UPDATE from a SELECT in SQL Server? 
Sql :: mysqkldump devilbox 
Sql :: select where mysql 
Sql :: windows aggregate functions in postgresql 
Sql :: How to take sum of column with same id and different table in SQL? 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =