oracle:
查询某tablespace下所有表
Select * From All_Tables Where Tablespace_name = 'xxxxxx'
查询数据库中的表空间
select * from dba_tablespaces
where tablespace_name = 'xxxxxx'//查询某表空间是否存在
查询某表字段名,字段属性
Select column_name,data_type From All_Tab_Columns Where owner = 'xxx' And table_name = 'xxx'
postgresSQL:
查询某用户,某tablespace下所有表
SELECT * FROM pg_tables WHERE tableowner = 'xxxx' and tablespace = 'xxxx'
查询数据库中的表空间
SELECT * FROM pg_tablespace
where spcname = 'tablespace'//查询某表空间是否存在
查询某表字段名,字段属性
SELECT format_type(a.atttypid,a.atttypmod) as type,a.attname as name, a.attnotnull as notnull FROM pg_class as c,pg_attribute as a where c.relname = 'tablename' and a.attrelid = c.oid and a.attnum>0
查询某tablespace下所有表
Select * From All_Tables Where Tablespace_name = 'xxxxxx'
查询数据库中的表空间
select * from dba_tablespaces
where tablespace_name = 'xxxxxx'//查询某表空间是否存在
查询某表字段名,字段属性
Select column_name,data_type From All_Tab_Columns Where owner = 'xxx' And table_name = 'xxx'
postgresSQL:
查询某用户,某tablespace下所有表
SELECT * FROM pg_tables WHERE tableowner = 'xxxx' and tablespace = 'xxxx'
查询数据库中的表空间
SELECT * FROM pg_tablespace
where spcname = 'tablespace'//查询某表空间是否存在
查询某表字段名,字段属性
SELECT format_type(a.atttypid,a.atttypmod) as type,a.attname as name, a.attnotnull as notnull FROM pg_class as c,pg_attribute as a where c.relname = 'tablename' and a.attrelid = c.oid and a.attnum>0