表名:
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‘
字段名:
mysql:
select * from information_schema.columns where table_schema=‘schema‘ and table_name=‘tableName‘
oracle:
select * from user_tab_columns where table_name=‘tableName‘
原文:http://www.cnblogs.com/bluemaplestudio/p/4274464.html