db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "amadis"<perl...@gmail.com>
Subject Re: Re: how to select all table names of some database in derby?
Date Sat, 23 Jun 2007 18:36:38 GMT
Hi, Derby Discussion    

ok, problem solved.
thanks, jean & Peter Ondruska.

solution 1:
select * from SYS.SYSTABLES;   -- this will show all the tables of database. Sorry Peter,
i was wrong at the first time.

solution 2:
select s.schemaname || '.' || t.tablename  
     from sys.systables t, sys.sysschemas s  
     where t.schemaid = s.schemaid 
          and t.tabletype = 'T' 
     order by s.schemaname, t.tablename;   -- this will show all the tables created by users.

solution 3:
The 10.2 release adds 'show tables' and 'describe' commands to ij.

----- Original Message -----      
From:   Jean T. Anderson      
To:   Derby Discussion      
Sent:  2007-06-24, 02:11:45     
Subject:  Re: how to select all table names of some database in derby?     

>On Sun, 24 Jun 2007 01:20:24 +0800, "amadis"  said: 
>> Hi, derby-user  
>>    i created a table in derby, but i forgot the name of the table, is 
>>    there any sql that can show all the names out? 
>This wiki page has a sql query that might help: 
>   http://wiki.apache.org/db-derby/ListTableNames 
>It also mentions the ij 'show tables' command that was introduced with 
>p.s. That wiki page is linked from this general hints&tips page: 
View raw message