How to Use Input-type Variable

    xiaoxiao2021-12-14  30

    --Create Procedure--  

    if object_id('inputtest') is not null  

    drop proc inputtest  

    Go 

     

    create proc inputtest  

    --This is proc declare, NOT variable declare--  

    @input_Student_number int  

    As  

    select * 

    from students   

    where student_number=@input_Student_number 

    --Create Procedure--  

       

    --Input Variables--  

    declare @input_new_Student_number int  

    SET @input_new_Student_number=50005764 

    exec inputtest  

    @input_new_Student_number  

      --------------------------------------------------------------------- 

    Tips: 

    You don’t need to declare 'Input' type because the default variable type is 'Input'. 

    转载请注明原文地址: https://ju.6miu.com/read-963109.html

    最新回复(0)