Thanks for the additional suggestions, Knut and Dan. I added a ListTableColumns entry to http://wiki.apache.org/db-derby/HintsAndTips summarizing all this. Anyone, feel free to add more tips -- the full URL is http://wiki.apache.org/db-derby/ListTableColumns .
cheers, -jean Daniel John Debrunner wrote: > Knut Anders Hatlen wrote: > > >>"Jean T. Anderson" <[EMAIL PROTECTED]> 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; >> > > > Or if you just want the column names: > > select * from MYTABLE where 1 = 0 > > Dan. > >
