Complete the code to create a table with inline data using VALUES.
SELECT * FROM ([1] (1, 'Apple'), (2, 'Banana'));
The VALUES clause is used to specify inline data rows directly in a query.
Complete the code to assign column names to the inline data using VALUES.
SELECT id, name FROM (VALUES (1, 'Orange'), (2, 'Grape')) AS [1](id, name);
After the VALUES clause, you can assign an alias with column names using AS alias(column1, column2).
Fix the error in the code to correctly use VALUES with column names.
SELECT * FROM (VALUES (1, 'Pear'), (2, 'Peach')) [1] fruits(id, name);
The AS keyword is required to assign an alias and column names to the VALUES inline table.
Fill both blanks to select only rows where id is greater than 1 from inline data.
SELECT * FROM (VALUES (1, 'Mango'), (2, 'Kiwi'), (3, 'Lime')) AS [1](id, name) WHERE id [2] 1;
The alias fruits names the inline table, and the condition id > 1 filters rows with id greater than 1.
Fill all three blanks to create inline data with alias and select names starting with 'B'.
SELECT name FROM (VALUES (1, 'Blueberry'), (2, 'Blackberry'), (3, 'Strawberry')) AS [1]([2], [3]) WHERE name LIKE 'B%';
The alias berries names the inline table, and the columns are id and name. The query selects names starting with 'B'.