Home > other >  How do I exclude rows in SQL where string does not contain two words
How do I exclude rows in SQL where string does not contain two words

Time:02-17

Example table to reproduce:

CREATE TABLE example
    (name varchar(200)
     
    );

INSERT INTO example
(name)
VALUES
('ab'),
('ab|test'),
('test');

SQL query:

select
name
from example
where name not like '           
  •  Tags:  
  • sql
  • Related