这里总结几个数据库的查询所有表字段名和字段类型的SQL语句:
mysql database:
select COLUMN_NAME, DATA_TYPE from information_schema.COLUMNS where table_name =
Oracle database:
select column_name, data_type from all_tab_columns where TABLE_NAME =
SQLServer database
select column_name,data_type from information_schema.columns where table_name =
Postgresql database
select column_name, data_type from information_schema.columns where table_name = 'ahnavi' ORDER BY ordinal_position;