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
  • Getting to Know Triggers

    SQL SELF
    Level 57, Lesson 0
    In this lecture, you'll find out what triggers are in databases, how they work, why they're used, their pros and cons, and you'll see real-life examples of using triggers for automation, logging, and keeping your data consistent.
    Available
  • Trigger Types in PostgreSQL: BEFORE, AFTER, INSTEAD OF

    SQL SELF
    Level 57, Lesson 1
    In this lecture, you'll learn about the three main types of triggers in PostgreSQL: BEFORE, AFTER, and INSTEAD OF. We'll break down when and why you use them, how to implement typical scenarios with code examples, and also look at the quirks and limitations of each trigger type.
    Available
  • Trigger Syntax Basics: CREATE TRIGGER, WHEN, EXECUTE FUNCTION

    SQL SELF
    Level 57, Lesson 2
    In this lecture, you'll learn how to create triggers in PostgreSQL: we'll break down the CREATE TRIGGER syntax, working with WHEN conditions, linking with EXECUTE FUNCTION, and also check out practical examples and common mistakes when working with triggers.
    Available
  • Creating a Simple Trigger for Updating Data: BEFORE INSERT

    SQL SELF
    Level 57, Lesson 3
    In this lecture, you'll learn how to create a BEFORE INSERT trigger in PostgreSQL to automatically fill the last_modified field when new records are added. We'll break down how to create a function for the trigger, the trigger itself, testing, common mistakes, and practical use cases.
    Available
  • How Triggers Interact with PL/pgSQL Functions: OLD, NEW, TG_OP

    SQL SELF
    Level 57, Lesson 4
    In this lecture, you'll learn how to use the special variables OLD, NEW, and TG_OP inside trigger functions in PostgreSQL. We'll break down, with hands-on examples, how to track data changes, log operations, and avoid common mistakes when working with triggers.
    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