SQL LIKE, IN and BETWEEN Explained Simply
Search text with LIKE, match a list with IN and filter ranges with BETWEEN, with simple examples, the NOT IN NULL trap and the date BETWEEN mistake that hides rows.
Search text with LIKE, match a list with IN and filter ranges with BETWEEN, with simple examples, the NOT IN NULL trap and the date BETWEEN mistake that hides rows.
A clear, 9-stage plan to learn SQL from zero: what to learn first, in what order, how long each stage takes, and a free tutorial for every step.
The SQL string functions you’ll use most in SQL Server and MySQL: CONCAT, LEN, TRIM, SUBSTRING, CHARINDEX, REPLACE and STRING_AGG, plus the NULL trap that blanks whole results.
A practical, step-by-step process for slow SQL Server queries: describe the symptom, check what’s running and blocking, read the plan, fix indexes and statistics, and measure the result.
SQL Server suggests missing indexes in the execution plan and the DMVs, but copying them blindly creates duplicates and slows writes. Here’s how to find them, read them, and decide.
The date functions you’ll use most in SQL Server and MySQL: current date, DATEADD, DATEDIFF, month end and formatting, plus the BETWEEN mistake that makes monthly totals wrong.
UNION removes duplicates, UNION ALL keeps every row and is faster. Learn when to use each, the rules every UNION must follow, and the trap that can make your totals wrong.
WHERE filters rows before grouping. HAVING filters groups after GROUP BY. See the difference with a simple sales example, the logical query order, and common mistakes.
You created an index but SQL Server still scans the table. Here are the 8 most common reasons, from functions on columns to implicit conversions, with the fix for each.
Execution plans look confusing at first. Learn to read a SQL Server plan step by step: right to left, arrow thickness, cost percentages, the operators that matter, and a real example.