Skip to content

Commit 6369a3f

Browse files
author
Eric Harmeling
authored
Merge pull request #5715 from cockroachdb/small-format-fixes
Small formatting fixes (mainly updated output)
2 parents d2cffae + 00bdc13 commit 6369a3f

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

v19.2/create-table-as.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ The [primary key](primary-key.html) of tables created with `CREATE TABLE ... AS`
104104
0a3d70a3-d70a-4d80-8000-000000000002 | new york | Judy White | 18580 Rosario Ville Apt. 61 | 2597958636
105105
0f5c28f5-c28f-4c00-8000-000000000003 | new york | Devin Jordan | 81127 Angela Ferry Apt. 8 | 5614075234
106106
147ae147-ae14-4b00-8000-000000000004 | new york | Catherine Nelson | 1149 Lee Alley | 0792553487
107-
(5 rows)
107+
19999999-9999-4a00-8000-000000000005 | new york | Nicole Mcmahon | 11540 Patton Extensions | 0303726947
108+
(6 rows)
108109
~~~
109110

110111
{% include copy-clipboard.html %}
@@ -124,7 +125,8 @@ The [primary key](primary-key.html) of tables created with `CREATE TABLE ... AS`
124125
0a3d70a3-d70a-4d80-8000-000000000002 | new york | Judy White | 18580 Rosario Ville Apt. 61 | 2597958636
125126
0f5c28f5-c28f-4c00-8000-000000000003 | new york | Devin Jordan | 81127 Angela Ferry Apt. 8 | 5614075234
126127
147ae147-ae14-4b00-8000-000000000004 | new york | Catherine Nelson | 1149 Lee Alley | 0792553487
127-
(5 rows)
128+
19999999-9999-4a00-8000-000000000005 | new york | Nicole Mcmahon | 11540 Patton Extensions | 0303726947
129+
(6 rows)
128130
~~~
129131

130132
### Change column names
@@ -148,7 +150,8 @@ This statement creates a copy of an existing table but with changed column names
148150
0a3d70a3-d70a-4d80-8000-000000000002 | Judy White
149151
0f5c28f5-c28f-4c00-8000-000000000003 | Devin Jordan
150152
147ae147-ae14-4b00-8000-000000000004 | Catherine Nelson
151-
(5 rows)
153+
19999999-9999-4a00-8000-000000000005 | Nicole Mcmahon
154+
(6 rows)
152155
~~~
153156

154157
### Create a table from a `VALUES` clause
@@ -190,7 +193,8 @@ This statement creates a copy of an existing table but with changed column names
190193
0a3d70a3-d70a-4d80-8000-000000000002 | new york | Judy White | 18580 Rosario Ville Apt. 61 | 2597958636
191194
0f5c28f5-c28f-4c00-8000-000000000003 | new york | Devin Jordan | 81127 Angela Ferry Apt. 8 | 5614075234
192195
147ae147-ae14-4b00-8000-000000000004 | new york | Catherine Nelson | 1149 Lee Alley | 0792553487
193-
(5 rows)
196+
19999999-9999-4a00-8000-000000000005 | new york | Nicole Mcmahon | 11540 Patton Extensions | 0303726947
197+
(6 rows)
194198
~~~
195199

196200
When a table copy is created this way, the copy is not associated to
@@ -215,8 +219,9 @@ original table.
215219
0f5c28f5-c28f-4c00-8000-000000000003 | new york | Devin Jordan
216220
051eb851-eb85-4ec0-8000-000000000001 | new york | James Hamilton
217221
0a3d70a3-d70a-4d80-8000-000000000002 | new york | Judy White
222+
19999999-9999-4a00-8000-000000000005 | new york | Nicole Mcmahon
218223
00000000-0000-4000-8000-000000000000 | new york | Robert Murphy
219-
(5 rows)
224+
(6 rows)
220225
~~~
221226

222227
{% include copy-clipboard.html %}
@@ -255,7 +260,8 @@ original table.
255260
0a3d70a3-d70a-4d80-8000-000000000002 | Judy White | new york | 18580 Rosario Ville Apt. 61 | 2597958636
256261
0f5c28f5-c28f-4c00-8000-000000000003 | Devin Jordan | new york | 81127 Angela Ferry Apt. 8 | 5614075234
257262
147ae147-ae14-4b00-8000-000000000004 | Catherine Nelson | new york | 1149 Lee Alley | 0792553487
258-
(5 rows)
263+
19999999-9999-4a00-8000-000000000005 | Nicole Mcmahon | new york | 11540 Patton Extensions | 0303726947
264+
(6 rows)
259265
~~~
260266

261267
{% include copy-clipboard.html %}

v19.2/drop-table.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,22 @@ To see how `users` is referenced from `vehicles`, you can use the [`SHOW CREATE`
118118
~~~
119119

120120
~~~
121-
table_name | create_statement
121+
table_name | create_statement
122122
+------------+-----------------------------------------------------------------------------------------------+
123-
vehicles | CREATE TABLE vehicles (
124-
| id UUID NOT NULL,
125-
| city STRING NOT NULL,
126-
| type STRING NULL,
127-
| owner_id UUID NULL,
128-
| creation_time TIMESTAMP NULL,
129-
| status STRING NULL,
130-
| current_location STRING NULL,
131-
| ext JSONB NULL,
132-
| CONSTRAINT "primary" PRIMARY KEY (city ASC, id ASC),
133-
| CONSTRAINT fk_city_ref_users FOREIGN KEY (city, owner_id) REFERENCES users(city, id),
134-
| INDEX vehicles_auto_index_fk_city_ref_users (city ASC, owner_id ASC),
135-
| FAMILY "primary" (id, city, type, owner_id, creation_time, status, current_location, ext)
136-
| )
123+
vehicles | CREATE TABLE vehicles (
124+
| id UUID NOT NULL,
125+
| city VARCHAR NOT NULL,
126+
| type VARCHAR NULL,
127+
| owner_id UUID NULL,
128+
| creation_time TIMESTAMP NULL,
129+
| status VARCHAR NULL,
130+
| current_location VARCHAR NULL,
131+
| ext JSONB NULL,
132+
| CONSTRAINT "primary" PRIMARY KEY (city ASC, id ASC),
133+
| CONSTRAINT fk_city_ref_users FOREIGN KEY (city, owner_id) REFERENCES users(city, id),
134+
| INDEX vehicles_auto_index_fk_city_ref_users (city ASC, owner_id ASC),
135+
| FAMILY "primary" (id, city, type, owner_id, creation_time, status, current_location, ext)
136+
| )
137137
(1 row)
138138
~~~
139139

0 commit comments

Comments
 (0)