Skip to content

Instantly share code, notes, and snippets.

View igeligel's full-sized avatar
🤷‍♀️
Shifting bits around the world

Kevin Peters igeligel

🤷‍♀️
Shifting bits around the world
View GitHub Profile
SELECT * FROM example_table WHERE LOWER(example_column) LIKE '%mel%';
id ... example_column ...
... ... ... ...
205 ... Mel ...
206 ... Melissa ...
207 ... Mel ...
209 ... Emelio ...
... ... ... ...
SELECT * FROM example_table
WHERE example_column LIKE '%mel%'
OR example_column LIKE '%Mel%';
const name = "Melissa";
const includesPattern = name.toLowerCase().includes("mel");
console.log(includesPattern);
// Outputs true
const name = "Melissa";
const includesPattern = name.includes("mel");
console.log(includesPattern);
// Outputs false
const name = "Emilio";
const includesPattern = name.includes("mel");
console.log(includesPattern);
const numbers = [1, 4, 9];
const includesFour = numbers.includes(4);
console.log(includesFour);
id ... example_column ...
... ... ... ...
203 ... Max ...
205 ... Mel ...
207 ... Mel ...
... ... ... ...
SELECT * FROM example_table WHERE example_column LIKE 'M__';
id ... example_column ...
205 ... Mel ...
206 ... Melissa ...
207 ... Mel ...