Home >Database >Mysql Tutorial >关于mssql 存储过程,函数 参数 默认值说明(1/4)

关于mssql 存储过程,函数 参数 默认值说明(1/4)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:47:251541browse

关于mssql ,函数 参数 默认值说明
创建我们一般的写法

create proc p(@s varchar(1)='a')

as

select @s

go

exec p

go
--1
alter proc p (@s decimal=a)
as
  select @s
go
exec p
go
/*

服务器: 消息 8114,级别 16,状态 5,过程 p,行 0
将数据类型 nvarchar 转换为 numeric 时出错。

*/

--2
alter proc p (@s varchar(1)=中)
as
  select @s
go
exec p
go
/*

    
----


(所影响的行数为 1 行)

Statement:
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