~ubuntu-branches/ubuntu/vivid/drizzle/vivid-proposed

« back to all changes in this revision

Viewing changes to docs/queries.rst

  • Committer: Package Import Robot
  • Author(s): Tobias Frost
  • Date: 2013-08-22 20:18:31 UTC
  • mto: (20.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20130822201831-gn3ozsh7o7wmc5tk
Tags: upstream-7.2.3
ImportĀ upstreamĀ versionĀ 7.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Executing Queries
2
2
=================
3
3
 
4
 
Queries retrieve data from a database based on specific criteria. They
5
 
are performed with the declarative SELECT statement, which has no
6
 
persistent effects on the database. SELECT simply retrieves data from
7
 
one or more tables, or expressions.
8
 
 
9
 
A query includes a list of columns to be included in a result set; an example of this would be:
 
4
'TODO'
10
5
 
11
6
.. code-block:: mysql
12
7
 
13
8
        SELECT * FROM table_name;
14
9
 
15
 
SELECT * FROM is an example of using SELECT with clauses. The select clause specifies the columns you want to retrieve. The from clause specifies the tables to search. 
 
10
'TODO' 
16
11
 
17
12
Keywords and clauses include:
18
13
 
34
29
        FROM table_name
35
30
        WHERE first_column_name > 1000;
36
31
 
37
 
The column names that follow the SELECT keyword determine the columns that will be returned in the results. You can select as many column names that you'd like, or you can use a * to select all columns (as shown in the first example above). The order in which they are specified will be reflected in your query results.
38
 
 
39
 
The table name that follows the keyword FROM specifies the table that will be queried to retrieve the desired results.
40
 
 
41
 
The WHERE clause (optional) specifies the data values or rows to be returned or displayed, based on the criteria described after the keyword WHERE.
 
32
'TODO'
 
 
b'\\ No newline at end of file'