Results for “lcm”
Small, practical examples. Search by task or narrow things down below.
Repeat the first ordered value beside each row
SQL Server: FIRST_VALUE reads the first value in the current window frame.
SQL Server✓ Tested
Replace a literal substring
SQL Server: REPLACE performs a literal replacement rather than a regular-expression substitution.
SQL Server✓ Tested
Report duplicate business values and their frequency
SQL Server: Group by a candidate business key and retain only groups with multiple rows.
SQL Server✓ Tested
Require a value with NOT NULL
SQL Server: Declare required fields at the database boundary, not only in application validation.
SQL Server✓ Tested
Require two filtering conditions
SQL Server: Combine category and quantity conditions with AND.
SQL Server✓ Tested
Return all rows tied for the maximum in a group
SQL Server: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
SQL Server✓ Tested
Return zero for a sum over no rows
SQL Server: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQL Server✓ Tested
Roll back a trial update
Group a change in a transaction and undo it.
transaction✓ Tested
Run a first SELECT query
SQL Server: Return a literal value without creating a table.
SQL Server✓ Tested
Search for a literal LIKE wildcard
SQL Server: Declare an escape character so a percent sign in the pattern is literal.
SQL Server✓ Tested
Select the highest values with TOP
Limit an ordered SQL Server result.
TOP✓ Tested
Select the top row in each group with a tie-breaker
SQL Server: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.
SQL Server✓ Tested