CLUSTER、DATABASE LINK、FUNCTION、INDEX、LIBRARY、PACKAGE、PACKAGE BODY、 PROCEDURE、SEQUENCE、SYNONYM、TABLE、TRIGGER、TYPE、UNDEFINED、VIEW。 4、表: select * from dba_tables; analyze my_table compute statistics;->dba_tables后6列 select extent_id,bytes from dba_extents where segment_name='CUSTOMERS'...
通过使用user_dependencies进行查看,如下: SELECT*FROMuser_dependenciesWHEREreferenced_name='SFCUSN'--Table_name 效果如下:
oracle常用经典SQL查询本篇文章是本人在工作中真理整理的一些常用的查询SQL语句如果喜欢记得收藏点赞分享关注哦 1、查看表空间的名称及大小select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_sizefrom dba_tablespaces t, dba_data_files dwhere t.tablespace_name = d.tablespace_namegroup by t....
store@PDB1> create view cheap_products_view3 asselect * from products where price < 15 with read only constraintcheap_products_view3_read_only; View created. 插入如下: store@PDB1> insert into cheap_products_view3 (product_id,product_type_id,name,price ) values ( 16,1,'Northern Front',...
---视图(VIEW):---视图在SQL中,所体现出的角色是和表一样的。看着和表一样,但是实际上并不是一张真实存在的表。---对应的于一条SELECT语句的查询结果集---相当于把SELECT查询结果集当成一张表看而已,然后再基于它做某些操作。---多列子查询就当做一张表看待,内视图。Java内部类。(重用子查询) ---视图...
select * from user_tab_comments -- 查询本用户的表,视图等。select * from all_col_comments --查询所有用户的表的列名和注释。select * from user_col_comments -- 查询本用户的表的列名和注释。select * from all_tab_columns --查询所有用户的表的列名等信息。select * from user_tab_...
SQL> select sid from v$mystat where rownum=1;select sid from v$mystat where rownum=1 *ERROR at line 1:ORA-00942: table or view does not exist hr用户无权访问v$mystat,所以换个方法,使用下面的命令得到hr用户当前的sid SQL> select userenv('sid') from dual;USERENV('SID')--- 132 得到SID...
create materialized view[视图名称]build immediate|deferred refresh fase|complete|force on demand|commit startwith[start time]next[next time]withprimary key|rowid//可以省略,一般默认是主键物化视图as[要执行的SQL] ok,解释一下这些语法用意: build immediate | deferred (视图创建的方式): ...
created from user_objects where object_name=upper('&table_name');查看某表的大小SQL>select sum(bytes)/(1024*1024) as "size(M)" from user_segmentswhere segment_name=upper('&table_name');查看放在 *** 的内存区里的表SQL>select table_name,cache from user_tables where instr(cache,'Y')>0...
I truncated tables, drop tables, now I want to dropp tahe tablespace but ot gave this error: I tried also altering the tablespace offline before dropping, but the same: ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ...