How can I count the number of columns in a table using an "ij"

You could query the system catalogs. Something like:

select count(*) from SYS.SYSTABLES, SYS.SYSCOLUMNS
       where SYS.SYSTABLES.TABLEID=SYS.SYSCOLUMNS.REFERENCEID
         and SYS.SYSTABLES.TABLENAME = 'MY-TABLE-NAME';

thanks,

bryan

Reply via email to