查询表名 SELECT tablename FROM pg_tables WHERE tablename NOT LIKE 'pg%' AND tablename NOT LIKE 'sql_%' ORDER BY tablename; 或者 select tablename from pg_tables where schemaname='public' 查询表结构 select col.table_schema, col.table_name, col.ordinal_position, c
---收缩数据库日志文件 USE [master]ALTER DATABASE yourdatabasename SET RECOVERY SIMPLE WITH NO_WAITALTER DATABASE yourdatabasename SET RECOVERY SIMPLE USE yourdatabasename DBCC SHRINKFILE (N'yourdatabasename _Log' , 0,TRUNCATEONLY) --数据库日志文件名(数据库右键-属性-日志逻辑文件名)
ORACLE如何查看表空间存储了那些数据库对象呢?可以使用下面脚本简单的查询表空间存储了那些对象: SELECT TABLESPACE_NAME AS TABLESPACE_NAME , SEGMENT_NAME AS SEGMENT_NAME , SUM(BYTES)/1024/1024 AS SEGMENT_SIZE FROM DBA_SEGMENTS WHERE TABLESPACE_NAME=&TABLESPACE_NAME GROUP
--1.查看表空间的名称及大小 )), ) ts_size FROM dba_tablespaces t, dba_data_files d WHERE t.tablespace_name = d.tablespace_name GROUP BY t.tablespace_name; --2.查看表空间物理文件的名称及大小 SELECT tablespace_name, file_id, file_name, ), ) total_space FROM dba_data_files ORDER
快速查看表对的就说明,及表字段描述及字段类型 --表描述 SELECT tbs.name 表名,ds.value 描述 FROM sys.extended_properties ds LEFT JOIN sysobjects tbs ON ds.major_id=tbs.id and tbs.name='Warrant_BaseInfo';--表名 --快速查看表结构 THEN obj.name ELSE '' END AS 表名, col.colorder AS 序号 , col.name A
--表描述 SELECT tbs.name 表名,ds.value 描述 FROM sys.extended_properties ds LEFT JOIN sysobjects tbs ON ds.major_id=tbs.id and tbs.name='Warrant_BaseInfo';--表名 --快速查看表结构 THEN obj.name ELSE '' END AS 表名, col.colorder AS 序号 , col.name AS 列名 , ISNULL(ep.[value
1.查看表所占空间 SELECT TABLESPACE_NAME,TO_CHAR(SUM(BYTES)/(1024*1024),'999G999D999') CNT_MB FROM DBA_EXTENTS WHERE OWNER='&OWNER' AND SEGMENT_NAME='&TABLE_NAME' AND SEGMENT_TYPE LIKE 'TABLE%' GROUP BY TABLESPACE_NAME;
mysql查看表结构命令,如下: desc 表名; show columns from 表名; describe 表名; show create table 表名; use information_schema select * from columns where table_name='表名'; 顺便记下: show databases; use 数据库名; show tables; 原有一unique索引AK_PAS_Name(PAC_Name)在表tb_webparamcounter中,
1.查看表空间的名称及大小 SELECT t.tablespace_name as "表空间名", )), ) AS "所占物理空间M" FROM dba_tablespaces t, dba_data_files d WHERE t.tablespace_name = d.tablespace_name GROUP BY t.tablespace_name; 2.查看表空间物理文件的名称及大小 SELECT tablespace_name AS "表空