From the course: Choosing a Database: PostgreSQL, MySQL, Mongo, and Cloud

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Features

Features - SQL Tutorial

From the course: Choosing a Database: PostgreSQL, MySQL, Mongo, and Cloud

Start my 1-month free trial

Features

- [Instructor] In this video we're going to look at creating a function within Postgres. Postgres offers the ability to write stored procedures in different programming languages. While all databases covered can distort procedures with their own specific languages, Postgres offers the most such as pgSQL, TCL, Perl and Python, and more that is not within its main distribution. This offers a lot of flexibility for developers who are more comfortable in a certain programming language and/or companies who want to use the same language everywhere to write procedures for Postgres. So, because we are predominantly using SQL here we are going to use SQL to create our function. So, we're going to create a really simple function and it's just going to add two numbers. First thing we want to do is write create function and we're going to set our parameters. So the functions name is add and we want it to take to an integer and we…

Contents