1.oracle
SELECT column_name, data_type, data_length, nullable";
FROM user_tab_columns ";
where table_name='";
 sql += $tableName;
 sql += "'";
2.sql server
select  name,xtype,length,isnullable  from  syscolumns where id =";
(select  top 1 Id   from  sysobjects  where name = '";
 sql += $tableName;
 sql += "')";
3.my sql
show columns from ";
 sql += $tableName;
或
desc ";
 sql += $tableName;
或
describe ";
 sql += $tableName;