1、mysql
查表名:
select table_name from information_schema.tables where table_schema='你的库名' and table_type='base table'
查表结构:
SELECT column_name, (CASE WHEN (is_nullable = 'no' && column_key != 'PRI') THEN '1' ELSE NULL END) AS is_required, (CASE WHEN column_key = 'PRI' THEN '1' ELSE '0' END) AS is_pk, ordinal_position AS sort, column_comment, (CASE WHEN extra = 'auto_increment' THEN '1' ELSE '0' END) AS is_increment, column_type
FROM information_schema.columns WHERE table_schema = '你的库名' AND table_name = '你的表名'
ORDER BY ordinal_position
2、oracle
整理中.......
3、sqlserver
整理中......