--CREATE A FUNCTION FOR ADD TWO USER INPUT VALUES. CREATE FUNCTION AddFun_sp(@NumIst INT, @NumpIInd INT) RETURNS INT AS BEGIN DECLARE @Result as int SET @Result=@NumIst+@NumpIInd RETURN @Result END --CALL A FUNCTION IN STORE PROCEDURE. CREATE PROCEDURE usp_CallAfunction ( @IstVar INT, @IIndVar INT ) AS BEGIN DECLARE @sp AS INT SET @sp=dbo.AddFun1(@IstVar,@IIndVar) PRINT @sp END --EXECUTE STORE PROCEDURE FOR OUTPUT RESULT. EXECUTE dbo.usp_CallAfunction '10', '20' --RESULT IS 30
Most Popular 37 Key Questions for JavaScript Interviews. What is Object in JavaScript? What is the Prototype object in JavaScript and how it is used? What is "this"? What is its value? Explain why "self" is needed instead of "this". What is a Closure and why are they so useful to us? Explain how to write class methods vs. instance methods. Can you explain the difference between == and ===? Can you explain the difference between call and apply? Explain why Asynchronous code is important in JavaScript? Can you please tell me a story about JavaScript performance problems? Tell me your JavaScript Naming Convention? How do you define a class and its constructor? What is Hoisted in JavaScript? What is function overloadin