转载自http://blog.csdn.net/cuker919/article/details/8514253 select segment_name, bytes as 大小 from user_segments where segment_type = 'TABLE' and segment_name in ('VIEW_JLZDH_MP_DL_DAY_01','VIEW_JLZDH_MP_DL_DAY_02','VIEW_JLZDH_MP_DL_DAY_03', 'VIEW_JLZDH_
查询tablename 数据库中 以"_copy" 结尾的表 select table_name from information_schema.tables where table_schema='tablename' and table_type='base table' and table_name like '%_copy'; information_schema 是MySQL系统自带的数据库,提供了对数据库元数据的访问information_schema.tables 指数据
有两种含义的表大小.一种是分配给一个表的物理空间数量,而不管空间是否被使用.可以这样查询获得字节数: select segment_name, bytes from user_segments where segment_type = 'TABLE'; 或者 Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name 另一种表实际使用的空间.这样查询: analyze table emp c
--查询tablename 数据库中 以"_copy" 结尾的表 select table_name from information_schema.tables where table_schema='tablename' and table_type='base table' and table_name like '%_copy'; --information_schema 是MySQL系统自带的数据库,提供了对数据库元数据的访问 --information_schema.tab
1.查询数据库中的所有数据库名: SELECT Name FROM Master..SysDatabases ORDER BY Name 2.查询某个数据库中所有的表名: SELECT Name FROM SysObjects Where XType='U' ORDER BY Name 3.查询表结构信息: 1 SELECT (case when a.colorder=1 then d.name else null end) 表名, 2 a.colorder 字段序号,a.name 字段名, 3
1.查询数据库中的所有数据库名: SELECT Name FROM Master..SysDatabases ORDER BY Name 2.查询某个数据库中所有的表名: SELECT Name FROM SysObjects Where XType='U' ORDER BY Name 3.查询表结构信息: 1 SELECT (case when a.colorder=1 then d.name else null end) 表名, 2 a.colorder 字段序号,a.name 字段名, 3