--查询某字段类型
SELECT information_schema.columns.data_type Into :ls_type
FROM information_schema.columns
WHERE ( information_schema.columns.table_name = ‘tablename’) AND
( information_schema.columns.column_name = :as_column ) ;
--查找某数据库中所有表
select table_name from information_schema.tables where table_catalog = 'dbname'
--查找某数据表中所有字段、类型
select column_name,data_type from information_schema.columns where information_schema.columns.table_name = 'tablename'