diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-06 07:28:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-06 07:28:09 +0000 |
commit | 52f4a5e2260f3e5b919b4e270339afd670bf0b8a (patch) | |
tree | 5ca419af0e2e409018492b82f5b9847f0112b5fb /tests/fixtures/identity.sql | |
parent | Adding upstream version 16.7.7. (diff) | |
download | sqlglot-52f4a5e2260f3e5b919b4e270339afd670bf0b8a.tar.xz sqlglot-52f4a5e2260f3e5b919b4e270339afd670bf0b8a.zip |
Adding upstream version 17.2.0.upstream/17.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/fixtures/identity.sql')
-rw-r--r-- | tests/fixtures/identity.sql | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/tests/fixtures/identity.sql b/tests/fixtures/identity.sql index 60a655a..162d627 100644 --- a/tests/fixtures/identity.sql +++ b/tests/fixtures/identity.sql @@ -414,6 +414,8 @@ SELECT 1 FROM a NATURAL LEFT JOIN b SELECT 1 FROM a NATURAL LEFT OUTER JOIN b SELECT 1 FROM a OUTER JOIN b ON a.foo = b.bar SELECT 1 FROM a FULL JOIN b ON a.foo = b.bar +SELECT 1 FROM a JOIN b JOIN c ON b.id = c.id ON a.id = b.id +SELECT * FROM a JOIN b JOIN c USING (id) USING (id) SELECT 1 UNION ALL SELECT 2 SELECT 1 EXCEPT SELECT 2 SELECT 1 EXCEPT SELECT 2 @@ -552,17 +554,17 @@ CREATE TABLE z AS ((WITH cte AS (SELECT 1) SELECT * FROM cte)) CREATE TABLE z (a INT UNIQUE) CREATE TABLE z (a INT AUTO_INCREMENT) CREATE TABLE z (a INT UNIQUE AUTO_INCREMENT) -CREATE TABLE z (a INT REFERENCES parent(b, c)) -CREATE TABLE z (a INT PRIMARY KEY, b INT REFERENCES foo(id)) -CREATE TABLE z (a INT, FOREIGN KEY (a) REFERENCES parent(b, c)) -CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON DELETE NO ACTION) -CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON DELETE CASCADE) -CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON DELETE SET NULL) -CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON DELETE SET DEFAULT) -CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON UPDATE NO ACTION) -CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON UPDATE CASCADE) -CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON UPDATE SET NULL) -CREATE TABLE foo (bar INT REFERENCES baz(baz_id) ON UPDATE SET DEFAULT) +CREATE TABLE z (a INT REFERENCES parent (b, c)) +CREATE TABLE z (a INT PRIMARY KEY, b INT REFERENCES foo (id)) +CREATE TABLE z (a INT, FOREIGN KEY (a) REFERENCES parent (b, c)) +CREATE TABLE foo (bar INT REFERENCES baz (baz_id) ON DELETE NO ACTION) +CREATE TABLE foo (bar INT REFERENCES baz (baz_id) ON DELETE CASCADE) +CREATE TABLE foo (bar INT REFERENCES baz (baz_id) ON DELETE SET NULL) +CREATE TABLE foo (bar INT REFERENCES baz (baz_id) ON DELETE SET DEFAULT) +CREATE TABLE foo (bar INT REFERENCES baz (baz_id) ON UPDATE NO ACTION) +CREATE TABLE foo (bar INT REFERENCES baz (baz_id) ON UPDATE CASCADE) +CREATE TABLE foo (bar INT REFERENCES baz (baz_id) ON UPDATE SET NULL) +CREATE TABLE foo (bar INT REFERENCES baz (baz_id) ON UPDATE SET DEFAULT) CREATE TABLE asd AS SELECT asd FROM asd WITH NO DATA CREATE TABLE asd AS SELECT asd FROM asd WITH DATA CREATE TABLE products (x INT GENERATED BY DEFAULT AS IDENTITY) @@ -573,7 +575,7 @@ CREATE TABLE IF NOT EXISTS customer (pk BIGINT NOT NULL GENERATED ALWAYS AS IDEN CREATE TABLE customer (pk BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 1 MINVALUE -1 MAXVALUE 1 NO CYCLE)) CREATE TABLE customer (pk BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10)) CREATE TABLE customer (pk BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (CYCLE)) -CREATE TABLE foo (baz_id INT REFERENCES baz(id) DEFERRABLE) +CREATE TABLE foo (baz_id INT REFERENCES baz (id) DEFERRABLE) CREATE TABLE foo (baz CHAR(4) CHARACTER SET LATIN UPPERCASE NOT CASESPECIFIC COMPRESS 'a') CREATE TABLE foo (baz DATE FORMAT 'YYYY/MM/DD' TITLE 'title' INLINE LENGTH 1 COMPRESS ('a', 'b')) CREATE TABLE t (title TEXT) @@ -648,7 +650,7 @@ ANALYZE a.y DELETE FROM x WHERE y > 1 DELETE FROM y DELETE FROM event USING sales WHERE event.eventid = sales.eventid -DELETE FROM event USING sales, USING bla WHERE event.eventid = sales.eventid +DELETE FROM event USING sales, bla WHERE event.eventid = sales.eventid DELETE FROM event USING sales AS s WHERE event.eventid = s.eventid DELETE FROM event AS event USING sales AS s WHERE event.eventid = s.eventid PREPARE statement @@ -794,6 +796,7 @@ ALTER TABLE a ADD FOREIGN KEY (x, y) REFERENCES bla SELECT partition FROM a SELECT end FROM a SELECT id FROM b.a AS a QUALIFY ROW_NUMBER() OVER (PARTITION BY br ORDER BY sadf DESC) = 1 +SELECT * FROM x WHERE a GROUP BY a HAVING b SORT BY s ORDER BY c LIMIT d SELECT LEFT.FOO FROM BLA AS LEFT SELECT RIGHT.FOO FROM BLA AS RIGHT SELECT LEFT FROM LEFT LEFT JOIN RIGHT RIGHT JOIN LEFT @@ -834,3 +837,4 @@ SELECT * FROM case SELECT * FROM schema.case SELECT * FROM current_date SELECT * FROM schema.current_date +SELECT /*+ SOME_HINT(foo) */ 1 |