Oracle存储过程选择查询 [英] Oracle stored procedure select query

查看:88
本文介绍了Oracle存储过程选择查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我找不到甲骨文头衔。所以我问了这个问题c#部分。



我的存储过程查询是这样的



First of all, i couldn''t find a "Oracle" title. So i asked this question c# section.

My stored Procedure query is like this

CREATE OR REPLACE PROCEDURE SMS_GET_INFO(action in sms_security.action varchar2)
AS
BEGIN

  SELECT ACTION into sms_action FROM SMS_SECURITY WHERE ACTION='deneme';

END SMS_GET_INFO;





但开发者在 sms_security.action 下划线,错误是;





but developer underline the "sms_security.action" and the error is;

Error(1,54): PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:     := . ) , @ % default character The symbol ":=" was substituted for "VARCHAR2" to continue. 





我该如何解决这个问题?



感谢您的帮助。



SHOUTING删除 - OriginalGriff [/ edit]



how can i solve this problem?

Thanks for your help.

[edit]SHOUTING removed - OriginalGriff[/edit]

推荐答案

程序声明应该是..

The procedure declaration should be ..
CREATE OR REPLACE PROCEDURE SMS_GET_INFO(sms_action in varchar2)
AS
BEGIN

  SELECT ACTION into sms_action FROM SMS_SECURITY WHERE ACTION='deneme';

END SMS_GET_INFO;





对不起。 ..那应该是错的。



Sorry ... got that wrong it should be.

CREATE OR REPLACE PROCEDURE SMS_GET_INFO(sms_action <big>out </big>varchar2)
AS





或您是否真的想说





or did you really want to say

CREATE OR REPLACE PROCEDURE SMS_GET_INFO(action in varchar2, sms_action out varchar2)
AS
BEGIN

  SELECT ACTION into sms_action FROM SMS_SECURITY WHERE ACTION=action;

END SMS_GET_INFO;





然后用SMS_GET_INFO(''deneme'',结果)



and then to call it with something like SMS_GET_INFO(''deneme'', result)

这篇关于Oracle存储过程选择查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆