desc 表名; show columns from 表名; describe 表名; show create table 表名; use information_schema select * from columns where table_name=’表名’; 顺便记下: show databases; 也可以这样 use information_schema select table_schema,table_name from tables where table_schema=’数据
1.获取所有数据库名: SELECT Name FROM Master..SysDatabases ORDER BY Name 2.获取所有表名: SELECT Name FROM DatabaseName..SysObjects Where XType=’U’ ORDER BY Name XType=’U’:表示所有用户表; XType=’S’:表示所有系统表; 3.获取所有字段名: SELECT Name FROM SysColumns WHERE id=Object_Id(‘TableNa