Skip to content

Instantly share code, notes, and snippets.

@karthiks
Created November 6, 2021 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karthiks/dd545065a4f419ff36ca1e1f3c3ba4e9 to your computer and use it in GitHub Desktop.
Save karthiks/dd545065a4f419ff36ca1e1f3c3ba4e9 to your computer and use it in GitHub Desktop.
inline scalar UDF
CREATE FUNCTION CUBE(@X INT)
RETURNS INT
AS
BEGIN
RETURN @X * @X *@X
END
/*
To execute the above function call it like below
SELECT dbo.CUBE(5)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment