describe table, show tables, show databases

359 views
Skip to first unread message

Dan Allen

unread,
Aug 8, 2007, 10:42:24 PM8/8/07
to H2 Database
Other than using the H2 web console, is there a way to describe a
table, show tables and show databases like in MySQL (just to give an
example). I searched the documentation, but found no mention of it
either way. It may be that this stuff is just not standard SQL, making
such a request a feature extension rather than a defect report.

An example of a describe in MySQL

+------------+---------------------+------+-----+---------
+----------------+
| Field | Type | Null | Key | Default |
Extra |
+------------+---------------------+------+-----+---------
+----------------+
| id | bigint(20) unsigned | NO | PRI | NULL |
auto_increment |
| version | int(11) unsigned | NO | |
| |
| username | varchar(16) | NO | UNI |
| |
| password | varchar(12) | NO | |
| |
| email | varchar(255) | NO | UNI |
| |
| first_name | varchar(50) | YES | | NULL
| |
| last_name | varchar(50) | YES | | NULL
| |
+------------+---------------------+------+-----+---------
+----------------+

Thomas Mueller

unread,
Aug 10, 2007, 2:34:48 PM8/10/07
to h2-da...@googlegroups.com
Hi,

This is non-standard. I know MySQL supports 'describe', I will add a
feature request for that. The standard way is using SELECT * FROM
INFORMATION_SCHEMA.COLUMNS

Thomas

AnselmD

unread,
Aug 10, 2007, 5:30:52 PM8/10/07
to H2 Database
Hi,

Oracle SQL*Plus supports describe, too.


DESCRIBE

DESC[RIBE] {[schema.]object[@connect_identifier]}

Lists the column definitions for the specified table, view, or
synonym, or the specifications for the specified function or
procedure.

http://download-east.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1009123

Anselm

On Aug 10, 8:34 pm, "Thomas Mueller" <thomas.tom.muel...@gmail.com>
wrote:


> Hi,
>
> This is non-standard. I know MySQL supports 'describe', I will add a
> feature request for that. The standard way is using SELECT * FROM
> INFORMATION_SCHEMA.COLUMNS
>
> Thomas
>

Reply all
Reply to author
Forward
0 new messages