Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 22 additions & 29 deletions docs/sql-ref-syntax-aux-show-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,41 +25,34 @@ Return the list of columns in a table. If the table does not exist, an exception

### Syntax

{% highlight sql %}
```sql
SHOW COLUMNS table_identifier [ database ]
{% endhighlight %}
```

### Parameters

<dl>
<dt><code><em>table_identifier</em></code></dt>
<dd>
* **table_identifier**

Specifies the table name of an existing table. The table may be optionally qualified
with a database name.<br><br>
<b>Syntax:</b>
<code>
{ IN | FROM } [ database_name . ] table_name
</code><br><br>
<b>Note:</b>
Keywords <code>IN</code> and <code>FROM</code> are interchangeable.
</dd>
<dt><code><em>database</em></code></dt>
<dd>
with a database name.

**Syntax:** `{ IN | FROM } [ database_name . ] table_name`

**Note:** Keywords `IN` and `FROM` are interchangeable.

* **database**

Specifies an optional database name. The table is resolved from this database when it
is specified. Please note that when this parameter is specified then table
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: removed Please note that

name should not be qualified with a different database name. <br><br>
<b>Syntax:</b>
<code>
{ IN | FROM } database_name
</code><br><br>
<b>Note:</b>
Keywords <code>IN</code> and <code>FROM</code> are interchangeable.
</dd>
</dl>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us avoid using HTML if possible.

is specified. When this parameter is specified then table
name should not be qualified with a different database name.

**Syntax:** `{ IN | FROM } database_name`

**Note:** Keywords `IN` and `FROM` are interchangeable.

### Examples

{% highlight sql %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can directly use ```sql

```sql
-- Create `customer` table in `salesdb` database;
USE salesdb;
CREATE TABLE customer(
Expand Down Expand Up @@ -96,9 +89,9 @@ SHOW COLUMNS IN customer IN salesdb;
| name|
|cust_addr|
+---------+
{% endhighlight %}
```

### Related Statements

* [DESCRIBE TABLE](sql-ref-syntax-aux-describe-table.html)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unneeded space.

* [SHOW TABLE](sql-ref-syntax-aux-show-table.html)
* [DESCRIBE TABLE](sql-ref-syntax-aux-describe-table.html)
* [SHOW TABLE](sql-ref-syntax-aux-show-table.html)