Search
 
SCRIPT & CODE EXAMPLE
 

SQL

create scalar function in sql server

CREATE FUNCTION [schema_name.]function_name (parameter_list)
RETURNS data_type AS
BEGIN
    statements
    RETURN value
END


----------------------------
CREATE FUNCTION sales.udfNetSale(
    @quantity INT,
    @list_price DEC(10,2),
    @discount DEC(4,2)
)
RETURNS DEC(10,2)
AS 
BEGIN
    RETURN @quantity * @list_price * (1 - @discount);
END;
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle list proxy users 
Sql :: bigquery add days to date 
Sql :: allow null in psql 
Sql :: get max salary from each department sql 
Sql :: Index a database column sql 
Sql :: postgresql random phone number 
Sql :: sql server drop database 
Sql :: get the location of where postgres database is stored 
Sql :: mysql vs postgresql 
Sql :: oracle dba_dependencies 
Sql :: rename column name sql server 
Sql :: intellij mysql set timezone 
Sql :: sample in sql 
Sql :: charindex 
Sql :: sql max of two values 
Sql :: odd record sql query 
Sql :: into sql 
Sql :: oracle change tablespace size 
Sql :: insert array into mysql column 
Sql :: multiple replace value mssql 
Sql :: sql oracle limit 
Sql :: sqlite3 pragma foreign keys 
Sql :: add clumn to table postgres 
Sql :: consecutive numbers sql 
Sql :: select the date 30 days less that the todays date sql request 
Sql :: create function postgresql 
Sql :: SQL Server query to get data for a particular date and time 
Sql :: Grant privileges of databse to user 
Sql :: set mysql password 
Sql :: add primary key to database sql 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =