db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: IRC chat summary: is there a way to find out column names in ij?
Date Fri, 07 Jul 2006 07:20:41 GMT
"Jean T. Anderson" <jta@bristowhill.com> writes:

> A user asked this question on #derby today (and here's a summary of the
> chat since there are probably others on this list with the same question):
>    Is there a way that I can find out what columns are in a table in ij?
>    like describe tablename or something?
> You can't do that in ij, but that feature has been logged as DERBY-1164.

Well, actually, you *can* do that in ij, but it's not very user
friendly. You could write a query against the system tables. To find
out what columns are in SYS.SYSCONSTRAINTS, enter this query:

  select columnnumber, columnname, columndatatype
    from sys.systables t, sys.syscolumns, sys.sysschemas s
    where tableid=referenceid and t.schemaid=s.schemaid
      and schemaname='SYS' and tablename='SYSCONSTRAINTS'
    order by columnnumber;

Knut Anders

View raw message