获取数据库表结构
MYSQL
select ORDINAL_POSITION, COLUMN_NAME, COLUMN_TYPE, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, IS_NULLABLE, COLUMN_DEFAULT, COLUMN_COMMENT, COLUMN_KEY, EXTRA from INFORMATION_SCHEMA.COLUMNS where table_name ='FILES'
oracle
select * from all_tab_columns t inner join all_col_comments c on t.table_name = c.table_name and t.COLUMN_NAME = c.COLUMN_NAME where t.TABLE_NAME ='files'
select table_name from user_tables; //当前用户的表
select table_name from all_tables; //所有用户的表
select table_name from dba_tables; //包括系统表
其中user_开头的是获取当前用户的表,all_开头的是所有用户的表,dba_开头的是包括系统表的