插入默认值

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

你可能感兴趣的:(默认值)