Professional Documents
Culture Documents
Ts Udf
Ts Udf
To Create a table:
"E_ID"integer,
"E_NAME"Nvarchar(35),
"OVERTIME(in_Hrs)"Integer );
To Drop a table:
Drop table"KABIL_PRACTICE"."OVERTIME";
Insertinto"KABIL_PRACTICE"."OVERTIME"values (2,'Nazeer',15);
Insertinto"KABIL_PRACTICE"."OVERTIME"values (3,'Kalai',10);
To Create function:
Create Function "KABIL_PRACTICE"."CONVERT_HRS"
(i_Hours integer)
as begin
End;
Table Function:
FUNCTION"USER2"."KABIL_PRACTICE::TBL_FN_DEMO" ( )
RETURNS Table(
"Order_ID"Decimal(8,1),
"Order_Date"Date,
"Order_Quantity"Decimal(5,1),
"Sales"Decimal(31,13)
)
LANGUAGE SQL SCRIPT
SQL SECURITY INVOKERAS
BEGIN
RETURN
select "Order_ID",
"Order_Date",
"Order_Quantity",
"Sales"
from"KABIL_PRACTICE"."SUPERSTORE_SALES";
END;