2017-12-27 182 views
0

我有一個SQL Server數據庫的查詢獲取存儲這樣的程序參數:獲得Oracle存儲過程的參數

SELECT 
    parameter.name, 
    types.name, 
    types.is_nullable 
FROM 
    sys.parameters AS parameter 
INNER JOIN 
    sys.procedures AS procedures ON parameter.object_id = procedures.object_id 
INNER JOIN 
    sys.types AS types ON parameter.system_type_id = types.system_type_id 
         AND parameter.user_type_id = types.user_type_id 
WHERE 
    procedures.name = 'UsernameSP' 

這將返回一個結果集:

name   name  is_nullable 
-------------------------------------- 
@Username  nvarchar 1 
@CreateDate datetime 1 

我需要這個查詢一個Oracle數據庫。我如何在Oracle中運行此查詢?

回答

2
select argument_name,position, data_type 
from user_arguments 
where object_name = <your procedure> 
order by position 

假定您已登錄到過程所在的當前模式。我不認爲甲骨文有相當於「is_nullable」