explain SELECT title FROM headings WHERE title LIKE '%cardiac%';
LIKE pattern filter. Here's what each part does:| Clause | Meaning |
|---|---|
SELECT title | Retrieve only the title column from the results |
FROM headings | Look in the table named headings |
WHERE title LIKE '%cardiac%' | Filter rows where the title contains the word cardiac |
LIKE Operator & WildcardsLIKE '%cardiac%':LIKE performs pattern matching on a string column (case-insensitive in most databases).% is a wildcard that matches zero or more of any characters.'%cardiac%' means:
cardiac (including nothing)cardiaccardiac (including nothing)| Title |
|---|
cardiac arrest |
acute cardiac failure |
non-cardiac chest pain |
cardiac (exact match) |
pericardiac conditions (contains the substring) |
"Give me all titles from theheadingstable where the title contains the word 'cardiac' anywhere in the text."
-- Starts with "cardiac"
WHERE title LIKE 'cardiac%'
-- Ends with "cardiac"
WHERE title LIKE '%cardiac'
-- Exact match (same as =)
WHERE title LIKE 'cardiac'
-- Case-sensitive match (PostgreSQL)
WHERE title ILIKE '%cardiac%' -- ILIKE = case-insensitive in PostgreSQL
% before and after the term = substring search (most flexible)LIKE is useful but not indexed efficiently on large tables — for full-text search at scale, consider MATCH()...AGAINST() (MySQL) or tsvector/tsquery (PostgreSQL)keyboard shortcut to go to file path in finder mac
/usr/local/bin or ~/Downloads).| Shortcut | Action |
|---|---|
Cmd + Shift + G | Go to folder (type a path) |
Cmd + L | (not Finder, but works in Open/Save dialogs to focus the path bar) |
Cmd + Shift + H | Go to Home folder |
Cmd + Shift + D | Go to Desktop |
Cmd + Shift + A | Go to Applications |
Cmd + Up Arrow | Go to parent folder |
/ or ~ while in Finder to instantly trigger the Go to Folder dialog pre-filled with / or ~/.