我有这个SQL Server查询:
CREATE PROCEDURE [dbo].[usp_GetBuyHoldSellValuationAdjusted_PE]
(@userName VARCHAR(255) = NULL,
@companyCode VARCHAR(255) = NULL,
@portfolioCode VARCHAR(255) = NULL,
@regionCode VARCHAR(255) = NULL,
@sectorCode VARCHAR(255) = NULL,
@countryCode VARCHAR(255) = NULL,
@recommend VARCHAR(255) = NULL,
@universe VARCHAR(20) = NULL,
@includeWatches BIT = NULL,
@economicClassificationCode VARCHAR(20) = NULL,
@InvestmentTypeCode VARCHAR(20) = NULL)
AS
BEGIN
如何将这部分转换为Oracle PL / SQL版本?
答案 0 :(得分:3)
类似这样的东西:
create procedure usp_GetBuyHoldSellValuationAdjusted_PE (
userName in varchar2 default null,
companyCode in varchar2 default null,
. . .
includeWatches in number default null,
economicClassificationCode in varchar2 default null,
InvestmentTypeCode in varchar2 default null
)
as
begin
区别是:
@
。varchar2
是首选数据类型。in
和out
或两者同时显示。default
作为默认值。bit
数据类型进行处理。