Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
3b99f74d
Commit
3b99f74d
authored
23 years ago
by
Tatsuo Ishii
Browse files
Options
Downloads
Patches
Plain Diff
Fix typo (add ;)
parent
2d12bc1e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/ref/alter_table.sgml
+5
-5
5 additions, 5 deletions
doc/src/sgml/ref/alter_table.sgml
with
5 additions
and
5 deletions
doc/src/sgml/ref/alter_table.sgml
+
5
−
5
View file @
3b99f74d
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.2
7
2001/09/
07 21:57:53 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.2
8
2001/09/
12 02:13:25 ishii
Exp $
Postgres documentation
Postgres documentation
-->
-->
...
@@ -280,28 +280,28 @@ ALTER TABLE distributors RENAME TO suppliers;
...
@@ -280,28 +280,28 @@ ALTER TABLE distributors RENAME TO suppliers;
<para>
<para>
To add a check constraint to a table:
To add a check constraint to a table:
<programlisting>
<programlisting>
ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5)
ALTER TABLE distributors ADD CONSTRAINT zipchk CHECK (char_length(zipcode) = 5)
;
</programlisting>
</programlisting>
</para>
</para>
<para>
<para>
To remove a check constraint from a table and all its children:
To remove a check constraint from a table and all its children:
<programlisting>
<programlisting>
ALTER TABLE distributors DROP CONSTRAINT zipchk
ALTER TABLE distributors DROP CONSTRAINT zipchk
;
</programlisting>
</programlisting>
</para>
</para>
<para>
<para>
To add a foreign key constraint to a table:
To add a foreign key constraint to a table:
<programlisting>
<programlisting>
ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses(address) MATCH FULL
ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses(address) MATCH FULL
;
</programlisting>
</programlisting>
</para>
</para>
<para>
<para>
To add a (multi-column) unique constraint to a table:
To add a (multi-column) unique constraint to a table:
<programlisting>
<programlisting>
ALTER TABLE distributors ADD CONSTRAINT dist_id_zipcode_key UNIQUE (dist_id, zipcode)
ALTER TABLE distributors ADD CONSTRAINT dist_id_zipcode_key UNIQUE (dist_id, zipcode)
;
</programlisting>
</programlisting>
</para>
</para>
</refsect1>
</refsect1>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment