欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

存储过程简单实例

程序员文章站 2022-04-14 13:02:31
USE [ty_szum_oa_v2] GO /****** Object: StoredProcedure [dbo].[ty_oa_insert_ty_oa_document_publish] Script Date: 2018/3/9 9:34:26 ******/ SET ANSI_NULL... ......
USE [ty_szum_oa_v2]
GO
/****** Object:  StoredProcedure [dbo].[ty_oa_insert_ty_oa_document_publish]    Script Date: 2018/3/9 9:34:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[ty_oa_insert_ty_oa_document_publish]  
( 
 @id uniqueidentifier,
 @workflow_instance_id int, 
 @open_type int, 
 @file_titile nvarchar(512),
 @file_content nvarchar(max),
 @draft_user_name nvarchar(32),
 @draft_dept_id int,
 @created_user_name nvarchar(32),
 @file_publish_date datetime,
 @file_state int,
 @remark nvarchar(max),
 @fid bigint,
 @db_created_id int,
 @db_created_date datetime,
 @db_last_updated_id int,
 @db_last_updated_date datetime,
 @db_status int
) 
--WITH ENCRYPTION  
AS  
BEGIN  
 SET NOCOUNT ON 
 INSERT INTO ty_oa_document_publish
 ( 
  [id]  
  ,[workflow_instance_id] 
  ,[open_type]  
  ,[file_titile]  
  ,[file_content]  
  ,[draft_user_name] 
  ,[draft_dept_id]
  ,[created_user_name]  
  ,[file_publish_date]
  ,[file_state] 
  ,[remark]  
  ,[db_created_id]  
  ,[db_created_date]
  ,[db_last_updated_id] 
  ,[db_last_updated_date]  
  ,[db_status] 
 )  
 VALUES  
 (  
  @id  
  ,@workflow_instance_id
  ,@open_type  
  ,@file_titile 
  ,@file_content  
  ,@draft_user_name  
  ,@draft_dept_id 
  ,@created_user_name 
  ,@file_publish_date  
  ,@file_state  
  ,@remark  
  ,@db_created_id  
  ,@db_created_date  
  ,@db_last_updated_id  
  ,@db_last_updated_date  
  ,@db_status  
 );  
END