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
  • Automating Tasks with Triggers

    SQL SELF
    Level 58, Lesson 0
    In this lecture, you'll learn how to automate logging changes and auditing data in PostgreSQL using triggers. We'll go over creating a log table, writing functions and triggers to track INSERT, UPDATE, DELETE operations, plus check out some real-world examples and important performance tips.
    Available
  • Trigger for Auto-Updating the last_modified Field When a Record Changes

    SQL SELF
    Level 58, Lesson 1
    In this lecture, you'll learn how to use a trigger and a PL/pgSQL function to automatically update the last_modified field in a table whenever the data changes. We'll go over creating the table, the function, a trigger with a condition, and also look at common mistakes and tips for using triggers in PostgreSQL.
    Available
  • Row-level and Statement-level Triggers: FOR EACH ROW vs FOR EACH STATEMENT

    SQL SELF
    Level 58, Lesson 2
    In this lecture, you'll learn the difference between FOR EACH ROW and FOR EACH STATEMENT triggers in PostgreSQL, figure out how to pick the right type for your tasks, check out some practical examples, and go over common mistakes when designing triggers.
    Available
  • Error and Transaction Handling in Triggers: EXCEPTION, RAISE

    SQL SELF
    Level 58, Lesson 3
    In this lecture, you'll learn how to handle errors and manage transactions inside PostgreSQL triggers using EXCEPTION blocks and the RAISE statement. We'll check out practical examples of logging errors, diagnosing with RAISE, and also look at common mistakes and ways to avoid them when working with triggers.
    Available
  • Analyzing Common Mistakes When Developing Triggers

    SQL SELF
    Level 58, Lesson 4
    In this lecture, you'll learn about the most common mistakes when creating triggers in PostgreSQL: recursion, incorrect use of OLD/NEW, conflicting triggers, performance and transaction issues. We'll break down examples, ways to avoid mistakes, and give you some practical tips for writing reliable and efficient 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