Frontend: https://paralleldb.vercel.app/
Backend swagger https://xd3yqahwskuxffslvniwhoxbvy0xuyrv.lambda-url.eu-central-1.on.aws/swagger/index.html
CREATE TABLE IF NOT EXISTS table1 (
id int DEFAULT 1,
name TEXT NOT NULL,
state boolean NOT NULL DEFAULT true
);
CREATE TABLE IF NOT EXISTS table2 (
id int DEFAULT 1,
name TEXT NOT NULL,
state boolean NOT NULL DEFAULT true
);
INSERT INTO table1 (id, name, state)
VALUES (1, 'A', true), (2, 'B', false),
(3, 'C', true), (4, 'D', false);
INSERT INTO table2 (id, name, state)
VALUES (1, 'A', true), (2, 'B', true),
(3, 'C', true), (4, 'D', true);
SELECT * FROM table1 WHERE state = true LIMIT 1;
id | name | state |
---|---|---|
1 | A | true |
SELECT name FROM table1 EXCEPT SELECT * FROM table2;
name |
---|
B |
D |
SELECT * FROM (SELECT * FROM table1), (SELECT * FROM table2);
id | name | state | id | name | state |
---|---|---|---|---|---|
1 | A | true | 1 | A | true |
1 | A | true | 2 | B | true |
1 | A | true | 3 | C | true |
1 | A | true | 4 | D | true |
2 | B | false | 1 | A | true |
2 | B | false | 2 | B | true |
2 | B | false | 3 | C | true |
2 | B | false | 4 | D | true |
3 | C | true | 1 | A | true |
3 | C | true | 2 | B | true |
3 | C | true | 3 | C | true |
3 | C | true | 4 | D | true |
4 | D | false | 1 | A | true |
4 | D | false | 2 | B | true |
4 | D | false | 3 | C | true |
4 | D | false | 4 | D | true |
UPDATE table1 SET name = 'X', state = false WHERE id = 1;
id | name | state |
---|---|---|
1 | X | false |
2 | B | false |
3 | C | true |
4 | D | false |
DELETE FROM table1 WHERE state = false;
id | name | state |
---|---|---|
3 | C | true |
DROP TABLE table1;