1.MySQL查询数据库中所有表名称
select table_name from information_schema.tables where table_schema='数据库名称';
2.根据字段名查询,所有包含该字段的表名称
select a.name 表名,b.name 列名 from sysobjects a,syscolumns b where a.id=b.id and b.name='exam_id' and a.type='U'
3.查询某数据库中指定表的所有字段名
select column_name from information_schema.columns where table_schema='csdb' and table_name='users'