提交 b305b955 authored 作者: Thomas Mueller's avatar Thomas Mueller

Remove old outer join syntax.

上级 76806f89
...@@ -5203,41 +5203,6 @@ SELECT * FROM TEST ORDER BY NAME; ...@@ -5203,41 +5203,6 @@ SELECT * FROM TEST ORDER BY NAME;
DROP TABLE IF EXISTS TEST; DROP TABLE IF EXISTS TEST;
> ok > ok
--- old-fashioned Oracle outer joins syntax ---------------------------------------------------------------------------------------------
CREATE TABLE Customers(CustomerID int);
> ok
CREATE TABLE Orders(CustomerID int);
> ok
INSERT INTO Customers VALUES(1), (2), (3);
> update count: 3
INSERT INTO Orders VALUES(1), (3);
> update count: 2
SELECT * FROM Customers LEFT OUTER JOIN Orders ON Customers.CustomerID = Orders.CustomerID;
> CUSTOMERID CUSTOMERID
> ---------- ----------
> 1 1
> 2 null
> 3 3
> rows: 3
SELECT * FROM Customers, Orders WHERE Customers.CustomerID = Orders.CustomerID(+);
> CUSTOMERID CUSTOMERID
> ---------- ----------
> 1 1
> 2 null
> 3 3
> rows: 3
DROP TABLE Customers;
> ok
DROP TABLE Orders;
> ok
--- complex join --------------------------------------------------------------------------------------------- --- complex join ---------------------------------------------------------------------------------------------
CREATE TABLE T1(ID INT PRIMARY KEY, NAME VARCHAR(255)); CREATE TABLE T1(ID INT PRIMARY KEY, NAME VARCHAR(255));
> ok > ok
......
...@@ -295,13 +295,6 @@ SELECT * FROM SYSTEM_RANGE(1, 100) FETCH FIRST ROW ONLY; ...@@ -295,13 +295,6 @@ SELECT * FROM SYSTEM_RANGE(1, 100) FETCH FIRST ROW ONLY;
> 1; > 1;
SET MODE REGULAR; SET MODE REGULAR;
CREATE TABLE Address (id NUMBER NOT NULL, city VARCHAR2(255), PRIMARY KEY (id));
CREATE TABLE Person (id NUMBER NOT NULL, name VARCHAR2(255), ADDRESS_ID NUMBER, PRIMARY KEY (id));
INSERT INTO PERSON (id, name) values (1, 'Frank');
SELECT 1 FROM Person t0, Address t1, Person t2 WHERE t0.ADDRESS_ID = t1.id(+) AND t1.id = t2.ADDRESS_ID(+);
> 1;
drop table Address, Person;
create domain email as varchar comment 'e-mail'; create domain email as varchar comment 'e-mail';
create table test(e email); create table test(e email);
select remarks from INFORMATION_SCHEMA.COLUMNS where table_name='TEST'; select remarks from INFORMATION_SCHEMA.COLUMNS where table_name='TEST';
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论