表名:
mysql:
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='schemaName' and TABLE_NAME = 'tablename';
oracle:
select TABLE_NAME from tabs where TABLE_NAME = 'tableName'
SqlServer:
use t3d select * from sysobjects where xtype='u' and status>=0
字段名:
mysql:
select * from information_schema.columns where table_schema='schema' and table_name='tableName'
oracle:
select * from user_tab_columns where table_name='tableName'
SqlServer:
use dbname select name from syscolumns where id=object_id(N'tableName') order by colid