带参数存储过程,以添加操作日志为例
CREATE PROC pro_Log @PL_OPERATE VARCHAR(50), @PL_XML TEXT, @PL_TYPE INT, @PL_ISERROR INT, @PL_ERRORCODE CHAR(2), @PL_MESSAGE VARCHAR(500), @PL_TIME DATETIME AS INSERT INTO dbo.PDA_LOG ( PL_OPERATE , PL_XML , PL_TYPE , PL_ISERROR , PL_ERRORCODE , PL_MESSAGE , PL_TIME )VALUES ( @PL_OPERATE , @PL_XML , @PL_TYPE , @PL_ISERROR , @PL_ERRORCODE , @PL_MESSAGE , @PL_TIME )