Expression lists
Description
Grammar Syntax
expression , expression , ... | (expression, expression, ...)Sample Source Patterns
Setup data
CREATE TABLE table1 (
quantity VARCHAR(50),
fruit VARCHAR(50)
);
CREATE TABLE table2 (
quantity VARCHAR(50),
fruit VARCHAR(50)
);
CREATE TABLE table3 (
id INT,
name VARCHAR(50),
quantity INT,
fruit VARCHAR(50),
price INT
);
INSERT INTO table1 (quantity, fruit)
VALUES
('one', 'apple'),
('two', 'banana'),
('three', 'cherry');
INSERT INTO table2 (quantity, fruit)
VALUES
('one', 'apple'),
('two', 'banana'),
('four', 'orange');
INSERT INTO table3 (id, name, quantity, fruit, price)
VALUES
(1, 'Alice', 1, 'apple', 100),
(2, 'Bob', 5, 'banana', 200),
(3, 'Charlie', 10, 'cherry', 300),
(4, 'David', 15, 'orange', 400);IN Clause
Input Code:
ID
NAME
QUANTITY
FRUIT
PRICE
Output Code:
ID
NAME
QUANTITY
FRUIT
PRICE
Comparisons
Input Code:
ID
NAME
QUANTITY
FRUIT
PRICE
Output Code:
ID
NAME
QUANTITY
FRUIT
PRICE
Input Code:
R1
R2
R3
R4
R5
Output Code:
R1
R2
R3
R4
R5
Nested tuples
Input Code:
ID
NAME
QUANTITY
FRUIT
PRICE
Output Code
ID
NAME
QUANTITY
FRUIT
PRICE
Case statement
Input Code:
RESULT
Output Code
RESULT
Multiple Expressions
Input Code:
ID
NAME
QUANTITY
FRUIT
PRICE
Output Code
ID
NAME
QUANTITY
FRUIT
PRICE
Joins
Input Code:
QUANTITY
FRUIT
QUANTITY
FRUIT
Output Code
QUANTITY
FRUIT
QUANTITY
FRUIT
Known Issues
Related EWIs
Last updated
