Question: are parameters mandatory to create a udf?
Answer: Yes you can definitely write User defined function without parameter. One more thing I want to clarify that function may have input parameter and it has return value. Return value would be scalar or table depend on type of function you are creation.