CREATE TABLE TEAMS
(
TEAM_ID INT
, TEAM_NAME VARCHAR2(100)
)
Table created.
INSERT INTO TEAMS (TEAM_ID, TEAM_NAME)
VALUES (1, 'Brazil')
1 row(s) inserted.
INSERT INTO TEAMS (TEAM_ID, TEAM_NAME)
VALUES (2, 'Italy')
1 row(s) inserted.
INSERT INTO TEAMS (TEAM_ID, TEAM_NAME)
VALUES (3, 'Argentina')
1 row(s) inserted.
INSERT INTO TEAMS (TEAM_ID, TEAM_NAME)
VALUES (4, 'Germany')
1 row(s) inserted.
SELECT * FROM TEAMS
TEAM_ID | TEAM_NAME | 1 | Brazil | 2 | Italy | 3 | Argentina | 4 | Germany |
---|
SELECT A.TEAM_NAME AS TEAM_A, B.TEAM_NAME AS TEAM_B
FROM TEAMS A
CROSS JOIN TEAMS B
WHERE A.TEAM_ID < B.TEAM_ID
TEAM_A | TEAM_B | Brazil | Italy | Brazil | Argentina | Brazil | Germany | Italy | Argentina | Italy | Germany | Argentina | Germany |
---|