0

Can I create a custom function in SQL ?

Here, SUM(),AVG(),SQRT() are pre-defined function. So can I create a new function ?

30th Sep 2021, 3:37 AM
NityaNanda Adhikary
NityaNanda Adhikary - avatar
2 ответов
+ 1
CREATE FUNCTION  function-name (Parameters)   RETURNS  return-type   AS   BEGIN       Statement 1       Statement 2                .                .       Statement n       RETURN return-value   END Yes! you can, This is the way of creating function
30th Sep 2021, 3:51 AM
Ankit Kushwaha
Ankit Kushwaha - avatar
0
"Select cust(column2) as custom from student;" Here how to define cust function in query box?
1st Oct 2021, 6:02 AM
NityaNanda Adhikary
NityaNanda Adhikary - avatar