CodeGym
AI Academy
Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme

Lessons

  • Reviews
  • About us
Start
Start learning
Start learning now
  • My Progress
  • Courses
  • University
  • Quest Map
  • Lessons
  • Creating Simple Functions: CREATE FUNCTION

    SQL SELF
    Level 50, Lesson 0
    In this lecture, you'll learn how to create simple functions in PostgreSQL using CREATE FUNCTION with the PL/pgSQL language. We'll go over the syntax, examples with parameters, return values and tables, plus common mistakes when writing functions.
    Available
  • How to Return Values from Functions in PL/pgSQL

    SQL SELF
    Level 50, Lesson 1
    In this lecture, you'll learn how to return values from functions in PL/pgSQL: from a simple RETURN of a single value to returning tables, multiple rows using RETURN QUERY, RETURNS TABLE, and SETOF. We'll break down common mistakes and practical examples for different scenarios.
    Available
  • Calling Functions from SQL Queries

    SQL SELF
    Level 50, Lesson 2
    Learn how to call user-defined functions right from your SQL queries in PostgreSQL: automate calculations, process data in SELECT, INSERT, UPDATE, filter with WHERE, integrate with aggregates, and avoid common mistakes. Real-life examples for your daily database work.
    Available
  • RAISE NOTICE, RETURN QUERY Statements

    SQL SELF
    Level 50, Lesson 3
    In this lecture, you'll learn how to use RAISE NOTICE for printing messages and debugging in PL/pgSQL, and also how to return data sets from functions using RETURN QUERY. Examples, common mistakes, and practical tips for working efficiently with PostgreSQL functions.
    Available
  • Breaking Down Common Mistakes When Creating Functions

    SQL SELF
    Level 50, Lesson 4
    In this lecture, we're gonna check out the most common mistakes when creating functions in PL/pgSQL: from forgetting RETURNS and RETURN to name conflicts, data type issues, and SQL injections. You'll learn how to dodge these, how to properly debug your functions, and how to write safe code.
    Available
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym