What NULL Really Means
NULL is not zero, not an empty string and not equal to itself. Learn what it represents, how it spreads through expressions and how to handle it delib...
Notes related to SQL.
131 notes tagged
NULL is not zero, not an empty string and not equal to itself. Learn what it represents, how it spreads through expressions and how to handle it delib...
Conditional logic inside a query, NULL substitution, safe division and explicit type conversion - four tools that remove most procedural code from SQL...
Current date and time, adding and subtracting intervals, differences between dates, extracting parts, and formatting - the least portable corner of SQ...
Rounding, truncating, absolute values, modulo and integer division - and the rounding rules that decide whether your invoice totals balance.
Concatenating, trimming, slicing, replacing and searching text - and which of these functions changes name in every dialect.
The four filtering shortcuts you will use constantly: set membership, ranges, pattern matching with wildcards, and the only correct way to test for NU...
Combining conditions correctly. Precedence between AND and OR, what NOT does to a NULL, and how to keep complex filters readable and index friendly.
WHERE decides which rows survive. Learn the comparison operators, how conditions are evaluated per row, and why a function around a column kills an in...
Sorting on one or many columns, NULL placement, and the four dialect specific ways to fetch page two of a result set - including why OFFSET gets slow.
Compute values in the select list, build derived columns from existing ones, and use DISTINCT correctly - including what it does across several column...
The statement you will write more than all the others combined. Choose columns, alias them, and learn why SELECT * belongs in the console and not in c...
DELETE removes rows permanently. Learn targeted deletes, deleting through a join, soft deletes and the habits that stop a one line mistake becoming an...