Home > Database > Mysql Tutorial > body text

MSSQL output使用

WBOY
Release: 2016-06-07 18:01:08
Original
1052 people have browsed it

存储过程 output 输出参数 可以是一个字符串


return num --只能是整数
CREATE PROCEDURE ch
@ch VARCHAR(55) OUTPUT,
@PING VARCHAR(45) OUTPUT
AS
SELECT @ch='ffgfgfg',@PING='chenssksksk'
--调用
DECLARE @chs VARCHAR(55),@pins VARCHAR(45)
EXECUTE ch @chs OUTPUT,@pins OUTPUT
PRINT @chs
PRINT @pins
=============
CREATE PROCEDURE PIN
AS
RETURN 1
DECLARE @NUM INT
SET EXECUTE @NUM=PIN
PRINT @NUM
==================
CREATE FUNCTION jian()
RETURNS VARCHAR(500)
AS
BEGIN
DECLARE @ch VARCHAR(50)
SET @ch='dkdkkddk'
RETURN @ch
END
SELECT dbo.jian()
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template