Results for “table variable”
Small, practical examples. Search by task or narrow things down below.
Select elements by an index range
PowerShell: An index range selects the requested array positions in order.
PowerShell✓ Tested
Select object properties
Create a smaller object with only the fields you need.
Select-Object✓ Tested
Select specific columns
Read only the fields a result needs.
SELECT✓ Tested
Select the first pipeline values
PowerShell: Select the first pipeline values using PowerShell 7.
PowerShell✓ 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: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.
SQL✓ Tested
Select values in an inclusive range
SQL: BETWEEN includes both endpoints of the range.
SQL✓ Tested
Serialize nested objects with an explicit depth
PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.
PowerShell✓ Tested
Serialize query rows as JSON
Return a JSON array directly from a SELECT.
FOR JSON✓ Tested
Set an environment value for one child command
Bash Scripts: A command-prefix assignment is visible to that command without overwriting the shell’s current variable.
Bash Scripts✓ Tested
Set an image’s default command
Use JSON array syntax for a predictable command.
Dockerfile✓ Tested
Show a group total beside each detail row
SQL: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.
SQL✓ Tested