Rumah > pangkalan data > tutorial mysql > Oracle查询所有序列

Oracle查询所有序列

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Lepaskan: 2016-06-07 15:08:05
asal
1888 orang telah melayarinya

--查看当前用户的所有序列select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences where sequence_owner='用户名';--查询当前用户的序列总数select count(*) from dba_sequences where sequence_owner='用户名';--示例:select SEQUENCE_OWNER,SEQUENCE_NA

--查看当前用户的所有序列
select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences where sequence_owner='用户名';


--查询当前用户的序列总数
select count(*) from dba_sequences where sequence_owner='用户名';


--示例:
select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences 
where sequence_owner=’WGB;

select count(*) from dba_sequences where sequence_owner=’ WGB’;

SQL> select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences
  2  where sequence_owner='WGB';

SEQUENCE_OWNER                 SEQUENCE_NAME
------------------------------ ------------------------------
WGB                            SEQ_FOR_TEST
WGB                            SEQ_WGB_ADMIN
WGB                            SEQ_WGB_COMMON
WGB                            SEQ_WGB_COMMONS
WGB                            SEQ_WGB_CONTACTOR
WGB                            SEQ_WGB_FACES
WGB                            SEQ_WGB_MEMBER
WGB                            SEQ_WGB_MESSAGE
WGB                            SEQ_WGB_MONEY_USER

已选择9行。

SQL> select count(*) from dba_sequences where sequence_owner='WGB';

  COUNT(*)
----------
         9
Salin selepas log masuk



注意事项:

1.      必须以管理员身份登录;

2.      sequence_owner必须为大写,不管你的用户名是否大写。只有大写才能识别。


参考资料:

http://zhidao.baidu.com/question/140904731





Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan