Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Scalar function syntax
- CREATE|ALTER FUNCTION [ schema_name. ] function_name
- ( [ { @param_name [ AS ]
- [ type_schema_name. ] param_data_type
- [ = default ] [ READONLY ] }
- [ ,...n ]
- ]
- )
- RETURNS return_data_type
- [ WITH <function_option> [ ,...n ] ]
- [ AS ]
- BEGIN
- function_body
- RETURN scalar_expression
- END
- [ ; ]
- -- Table-Valued function syntax
- CREATE|ALTER FUNCTION [ schema_name. ] function_name
- ( [ { @param_name [ AS ]
- [ type_schema_name. ] param_data_type
- [ = default ] [ READONLY ] }
- [ ,...n ]
- ]
- )
- RETURNS TABLE
- [ WITH <function_option> [ ,...n ] ]
- [ AS ]
- RETURN [ ( ] select_stmt [ ) ]
- [ ; ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement