Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita521d5a

Browse files
committed
Update obsolete syntax in example of inheritance.
1 parent2dd06b0 commita521d5a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

‎src/tutorial/advanced.source

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
--
77
-- Copyright (c) 1994, Regents of the University of California
88
--
9-
-- $Id: advanced.source,v 1.4 2001/09/02 23:27:50petere Exp $
9+
-- $Id: advanced.source,v 1.5 2002/04/11 21:18:50tgl Exp $
1010
--
1111
---------------------------------------------------------------------------
1212

1313
-----------------------------
1414
-- Inheritance:
15-
--S table can inherit from zero or more tables. A query can reference
15+
--A table can inherit from zero or more tables. A query can reference
1616
--either all rows of a table or all rows of a table plus all of its
1717
--descendants.
1818
-----------------------------
@@ -41,19 +41,19 @@ INSERT INTO capitals VALUES ('Madison', 1.913E+5, 845, 'WI');
4141
SELECT * FROM cities;
4242
SELECT * FROM capitals;
4343

44-
-- like before, a regular query references rows of the base table only
45-
46-
SELECT name, altitude
47-
FROM cities
48-
WHERE altitude > 500;
49-
50-
-- on the other hand, you can find all cities, including capitals, that
51-
-- are located at an altitude of 500 'ft or higher by:
44+
-- You can find all cities, including capitals, that
45+
-- are located at an altitude of 500 ft or higher by:
5246

5347
SELECT c.name, c.altitude
54-
FROM cities* c
48+
FROM cities c
5549
WHERE c.altitude > 500;
5650

51+
-- To scan rows of the parent table only, use ONLY:
52+
53+
SELECT name, altitude
54+
FROM ONLY cities
55+
WHERE altitude > 500;
56+
5757

5858
-- clean up (you must remove the children first)
5959
DROP TABLE capitals;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp