annotate docs/source/capabilities.rst @ 268:7aa24643e358

json almost working
author catherine@dellzilla
date Wed, 18 Mar 2009 09:28:21 -0400
parents f0f293d83337
children 3c5fa8ed4f8b
rev   line source
247
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
1 SQLPython's extra capabilities
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
2 ==============================
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
3
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
4 For the most part, SQLPython simply duplicates SQL\*Plus's capabilites.
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
5
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
6 UNIX-like commands
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
7 ==================
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
8
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
9 ls
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
10 Lists objects from the data dictionaries. There are implied wildcards at the beginning and
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
11 end
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
12
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
13 cat
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
14 Shorthand for "SELECT * FROM"
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
15
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
16 PostgreSQL-like shortcuts
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
17 =========================
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
18
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
19 ----- ------------------
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
20 z y
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
21 ----- ------------------
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
22 \\c connect
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
23 \\d desc
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
24 \\e edit
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
25 \\g run
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
26 \\h help
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
27 \\i load
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
28 \\o spool
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
29 \\p list
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
30 \\q quit
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
31 \\w save
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
32 \\db _dir_tablespaces
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
33 \\dd comments
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
34 \\dn _dir_schemas
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
35 \\dt _dir_tables
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
36 \\dv _dir_views
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
37 \\di _dir_indexes
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
38 \\? help psql
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
39 ----- ------------------
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
40
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
41 Wild SQL
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
42 ========
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
43
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
44 Wild SQL is a nonstandard SQL feature that must be enabled with `set wildsql on`. When it is
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
45 enabled, column names in a SELECT statement do not need to be explicitly typed.
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
46
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
47 * % or \* as wildcards::
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
48
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
49 SELECT d* FROM v$database;
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
50
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
51 SELECT
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
52
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
53 Wild SQL can only be used in the primary column list of straightforward SELECT statements,
f0f293d83337 begin docs
catherine@dellzilla
parents:
diff changeset
54 not in subqueries, `UNION`ed queries, etc.