Skip to content

Commit

Permalink
Minor edits + Replicated changes to v2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Amruta-Ranade committed May 21, 2018
1 parent 584ad2f commit 0b7dd0c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions v2.0/create-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ pq: database "bank" already exists
{% include copy-clipboard.html %}
~~~ sql
> SHOW DATABASES;
~~~

~~~
+----------+
| Database |
+----------+
Expand Down
10 changes: 10 additions & 0 deletions v2.1/create-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ Parameter | Description

### Create a Database

{% include copy-clipboard.html %}
~~~ sql
> CREATE DATABASE bank;
~~~

{% include copy-clipboard.html %}
~~~
> SHOW DATABASES;
~~~
Expand All @@ -47,6 +49,7 @@ Parameter | Description

### Create Fails (Name Already In Use)

{% include copy-clipboard.html %}
~~~ sql
> SHOW DATABASES;
~~~
Expand All @@ -60,6 +63,7 @@ Parameter | Description
+----------+
~~~

{% include copy-clipboard.html %}
~~~ sql
> CREATE DATABASE bank;
~~~
Expand All @@ -68,8 +72,12 @@ Parameter | Description
pq: database "bank" already exists
~~~

{% include copy-clipboard.html %}
~~~ sql
> SHOW DATABASES;
~~~

~~~
+----------+
| Database |
+----------+
Expand All @@ -78,12 +86,14 @@ pq: database "bank" already exists
+----------+
~~~

{% include copy-clipboard.html %}
~~~ sql
> CREATE DATABASE IF NOT EXISTS bank;
~~~

SQL does not generate an error, but instead responds `CREATE DATABASE` even though a new database wasn't created.

{% include copy-clipboard.html %}
~~~ sql
> SHOW DATABASES;
~~~
Expand Down

0 comments on commit 0b7dd0c

Please sign in to comment.