How can I calculate Area with the help of Store Procedure in Sql

  • 4 Comments sorted by
  • which kind of area kindly fully brief your requirement.
  • circule

  •  i have calculate cube in sql from this Query

    create procedure calc_cube
    @cube int=0
    as
    return(@cube*@cube*@cube)

    declare @Result int
    exec @Result = calc_cube 10
    print @Result

    now i want calculate area which resemble from this Query
  • you can calculate circle area with this procedure.


    create PROCEDURE [dbo].[SP_Circle]
    -- Add the parameters for the stored procedure here
    @Radius decimal(18,2)

    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    select @Radius * @Radius * 3.14 Area

    END

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Tagged

Popular Posts of the Week