Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
87aafa16
Commit
87aafa16
authored
Mar 01, 2005
by
Neil Conway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SGML improvements to the DML chapter.
parent
a2ad04f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
doc/src/sgml/dml.sgml
doc/src/sgml/dml.sgml
+14
-10
No files found.
doc/src/sgml/dml.sgml
View file @
87aafa16
<!-- $PostgreSQL: pgsql/doc/src/sgml/dml.sgml,v 1.1
0 2005/01/22 22:56:35 momjian
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/dml.sgml,v 1.1
1 2005/03/01 23:45:00 neilc
Exp $ -->
<chapter id="dml">
<chapter id="dml">
<title>Data Manipulation</title>
<title>Data Manipulation</title>
...
@@ -38,10 +38,10 @@
...
@@ -38,10 +38,10 @@
</para>
</para>
<para>
<para>
To create a new row, use the <
literal>INSERT</literal> command.
To create a new row, use the <
xref linkend="sql-insert"
The command requires the table name and a value for each of
the
xreflabel="sql-insert-title"> command. The command requires
the
columns of the table. For example, consider the products table
table name and a value for each of the columns of the table. For
from <xref linkend="ddl">:
example, consider the products table
from <xref linkend="ddl">:
<programlisting>
<programlisting>
CREATE TABLE products (
CREATE TABLE products (
product_no integer,
product_no integer,
...
@@ -98,7 +98,9 @@ INSERT INTO products DEFAULT VALUES;
...
@@ -98,7 +98,9 @@ INSERT INTO products DEFAULT VALUES;
To do <quote>bulk loads</quote>, that is, inserting a lot of data,
To do <quote>bulk loads</quote>, that is, inserting a lot of data,
take a look at the <xref linkend="sql-copy"
take a look at the <xref linkend="sql-copy"
endterm="sql-copy-title"> command. It is not as flexible as the
endterm="sql-copy-title"> command. It is not as flexible as the
<command>INSERT</command> command, but is more efficient.
<command>INSERT</command> command, but is more efficient. Refer to
<xref linkend="populate"> for more information on improving bulk
loading performance.
</para>
</para>
</tip>
</tip>
</sect1>
</sect1>
...
@@ -188,7 +190,7 @@ UPDATE products SET price = price * 1.10;
...
@@ -188,7 +190,7 @@ UPDATE products SET price = price * 1.10;
<para>
<para>
You can update more than one column in an
You can update more than one column in an
<
literal>UPDATE</literal
> command by listing more than one
<
command>UPDATE</command
> command by listing more than one
assignment in the <literal>SET</literal> clause. For example:
assignment in the <literal>SET</literal> clause. For example:
<programlisting>
<programlisting>
UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0;
UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0;
...
@@ -222,9 +224,11 @@ UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0;
...
@@ -222,9 +224,11 @@ UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0;
</para>
</para>
<para>
<para>
You use the <literal>DELETE</literal> command to remove rows; the
You use the <xref linkend="sql-delete"
syntax is very similar to the <literal>UPDATE</literal> command.
xreflabel="sql-delete-title"> command to remove rows; the syntax is
For instance, to remove all rows from the products table that have a price of 10, use
very similar to the <command>UPDATE</command> command. For
instance, to remove all rows from the products table that have a
price of 10, use
<programlisting>
<programlisting>
DELETE FROM products WHERE price = 10;
DELETE FROM products WHERE price = 10;
</programlisting>
</programlisting>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment