Dict.CN 在线词典, 英语学习, 在线翻译 ------------- MyGitee 朱秋贵内科诊所 My腾云code

插入默认值

USE [daitest]
GO
/****** 对象:  StoredProcedure [dbo].[TB_aa_Add]    脚本日期: 12/29/2008 21:42:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
------------------------------------
ALTER PROCEDURE [dbo].[TB_aa_Add]
@id int output,
@passWord int

 AS
    if @password is null
    begin

    INSERT INTO [TB_aa](
    [passWord]
    )VALUES(
    default
    )
   

   end
   else
   begin
   INSERT INTO [TB_aa](
    [passWord]
    )VALUES(
    @password
    )
   end

   SET @id = @@IDENTITY

posted @ 2008-12-29 21:43  cn2024  阅读(162)  评论(0编辑  收藏  举报