SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
GO CREATE proc [dbo].[is_yy]
@return_value varchar(2) out,
@p1 varchar(20),
@p2 varchar(50)
as
begin
if @p1=''
begin
SET @return_value = ''
RETURN @return_value
end
if @p2=''
begin
SET @return_value = ''
RETURN @return_value
end end GO

存储过程如上,执行如下:

DECLARE @return_value1 VARCHAR(50)
EXEC @return_value1 =is_yy '', '',''
SELECT @return_value1 DECLARE @return_value2 VARCHAR(50)
EXEC @return_value2 =is_yy '', '',''
SELECT @return_value2

执行结果如下:

aaarticlea/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAASUAAACRCAYAAACFS66gAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA0LSURBVHhe7Z1bb9vIGYb1n9wtvPkvi8BWoB8SYNEm6UVuuoDvclEEWDRNbBfI9V4uugaCZOPsIkY2B+e0OSDxQbYsyZjyozTJaDhDSrQsDjnPgz5L8puhyHE7b0e0y7ZUwuW/XVeHh4cT3rhxQ33+/BkRcaESSogYlIQSIgZlYShd+cc/o9T+QSHiYpwqlGKDUEKsTkLJgV4tNVH7PwCIoUkoOZAxD4fDxkkoYR2cSyh11rZyXeq4DRUZ8/7+fsaffvopdXNzM+ONG/9ynhOKhBLWxbmFUvKvr65JLd9pQ6nVSm9xAldtnvhCaU0G5+Ddu3fJmNac54QioYR18VxXSvbKaMKl+YeS1IucBhnz3t5eRjOU5Hjrg0q9+b/PqpMkrd0/JAeDAaGEtXAuoWSvIH755Zfx3gj5yqPp9Xpp/6WlzrjixwwRO1xMNea+UHTswzd59Th/++03tbW1lY5TAknqEkquc86i3K+rbjpNH5FQwrqYztJ5h5IZQoI8cxEkkOS/taX/t99+m9Z8mAEybbhIvchpkDF/+vQpo9z3WhJGMh7Zl+dIWgkl1znTKPc1636Ruq+WUMK6OJdQkkkpqwdZOeiHwaZ6EusHwtOGktbGVRPsetGxDxnzx48fM8p9u5DV0pdV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95y9gldVkoQK3MOJXnDog6E8wulvJXSz9//1Qiie+ryNy313Y/ZfqFbHPwAzaSRKyVTCam/fH/P2RayrJQgVkqHUv4rcTdVu3VJrTvbzqZcO2+lNCkrJYC6UTqU8t8+uaFWJZScbWdTru2axC7Tr3Lf/F397GgLXVZKECu1DKVpVkp1DiRRxgkQI+VDKfftkxJKbXXH2XY25dquSWxa90ASWSlBrNQylHJXSj+uJO0r6qarrUbKOAFipHQo5b8SN/tq2nkp13ZNYu3E3yiN5bdvAPWhdChV9UpcubZMWNdEbpIyToAYKR9KvWpeiSvXdk3ipslKCWKldChV9UpauTYrJYDmUjqUXK9uXYRybdckbpqslCBWSoeS6/Wti1CuzUoJoLmUDqWqlWBq+hYgRkqFEgDAeUEoAUBQEEoAEBSEEgAEBaEEAEFBKAFAUBBKABAUhBIABAWhBABBQSgBQFAQSgAQFIQSAAQFoQQAQUEoAUBQEEoAEBSEEgAEBaEEAAGh1P8BJcEhnJdzu2QAAAAASUVORK5CYIIA" alt="" />

sql server 查询存储过程返回值的更多相关文章

  1. 【转】SQL SERVER 获取存储过程返回值

    1.OUPUT参数返回值 CREATE PROCEDURE [dbo].[nb_order_insert]( @o_buyerid int , @o_id bigint OUTPUT ) AS BEG ...

  2. SQL Server 创建带返回值的存储过程

    --drop procedure zcstest; create procedure zcstest ( @tableName varchar(max), @dataCount int output ...

  3. SQL Server 查询某个字段值在哪张表的哪个字段

    我要查找值为‘WSCOL1525’的字段. declare @cloumns varchar(40)declare @tablename varchar(40)declare @str varchar ...

  4. sql server 查询存储过程指令

    Sp_helptext PROCEDUREName 例子 创建存储过程 CREATE PROCEDURE SelectFromBitTable AS BEGIN select pkid,isdelet ...

  5. 数据库表设计时一对一关系存在的必要性 数据库一对一、一对多、多对多设计 面试逻辑题3.31 sql server 查询某个表被哪些存储过程调用 DataTable根据字段去重 .Net Core Cors中间件解析 分析MySQL中哪些情况下数据库索引会失效

    数据库表设计时一对一关系存在的必要性 2017年07月24日 10:01:07 阅读数:694 在表设计过程中,我无意中觉得一对一关系觉得好没道理,直接放到一张表中不就可以了吗?真是说,网上信息什么都 ...

  6. 如何在SQL Server查询语句(Select)中检索存储过程(Store Procedure)的结果集?

    如何在SQL Server查询语句(Select)中检索存储过程(Store Procedure)的结果集?(2006-12-14 09:25:36) 与这个问题具有相同性质的其他描述还包括:如何 ...

  7. SQL存储过程返回值

    1 SQL存储过程返回值有3种 1.1 直接return返回(例如 return 1): 1.2 通过参数output返回(例如字符串类型): 1.3 直接返回程序集(Dataset程序集). 2 用 ...

  8. sql server 查询某个表被哪些存储过程调用

    sql server 查询某个表被哪些存储过程调用 select distinct object_name(id) from syscomments where id in (select id fr ...

  9. SQL Server 2008 存储过程,带事务的存储过程(创建存储过程,删除存储过程,修改存储过

    SQL Server 2008 存储过程,带事务的存储过程(创建存储过程,删除存储过程,修改存储过     存储过程 创建存储过程 use pubs --pubs为数据库 go create proc ...

随机推荐

  1. 自动化运维——MySQL备份脚本(二)

    使用if语句编写MySQL备份脚本 代码: #!/bin/bash #auro backup mysql db #by steve yu #define backup path BAK_DIR=/da ...

  2. Laying out a webpage is easy with flex

    Flex写起来省劲很多,只用加上flex-wrap:wrap在container上.Html5 playground

  3. 怎么去掉zencart模板网址后面的zenid=数字这个东西

    搜索引擎优化后第一次进入商店网址URL后面会出现zenid=XXXX 如:http://afish.cnblogs.com/zencart-zenid.html?zenid=tbisz675099db ...

  4. mysql数据库表自增ID批量清零 AUTO_INCREMENT = 0

    mysql数据库表自增ID批量清零 AUTO_INCREMENT = 0 #将数据库表自增ID批量清零 SELECT CONCAT( 'ALTER TABLE ', TABLE_NAME, ' AUT ...

  5. WIndows cmd command 指令总结

    1. 文件操作 显示当前文件夹内所有文件 dir dir /s 仅显示特定后缀的文件 # 查找当前目录下所有mp3文件dir /s *.mp3

  6. 10.Go-goroutine,waitgroup,互斥锁,channel和select

    10.1.goroutine goroutine的使用 //Learn_Go/main.go package main import ( "fmt" "time" ...

  7. thinkphp5.11 关于数据库连接的配置

    config.php <?php// +----------------------------------------------------------------------// | Th ...

  8. JavaScript基础——JavaScript函数(笔记)

    avaScript 函数(笔记) JavaScript 是函数式编程语言,在JavaScript脚本中可以随处看到函数,函数构成了JavaScript源代码的主体. 一.定义函数 定义函数的方法有两种 ...

  9. http的get与post

    1.http请求 http有两种报文,请求报文 (发送请求,可能包含数据)和响应报文(服务器响应请求获取数据).一个http请求报文由请求行,请求头部,空行和请求正文(数据)四个部分组成. HTTP请 ...

  10. ython CGI编程Ⅱ

    HTTP头部 hello.py文件内容中的" Content-type:text/html"即为HTTP头部的https://www.xuanhe.net/一部分,它会发送给浏览器 ...