CrazyEngineers
  • Can anyone explain how this racursive CTE works?

    Kanagavel A

    Member

    Updated: Oct 25, 2024
    Views: 1.1K
    with


    factorial(n,fact)as
    (
    select
    2,cast(2 asfloat)
    union
    all
    select
    n+1,(n+1)*fact
    from
    factorial
    where
    n<50
    )
    select
    n,fact
    from
    factorial
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register