What does the GENERATED ALWAYS AS (expression) STORED column definition do?

SQL Fundamentals Hard

SQL Fundamentals — Hard

What does the GENERATED ALWAYS AS (expression) STORED column definition do?

Key points

  • This option ensures that the column value is always up-to-date
  • It eliminates the need for manual updates when referenced columns change
  • The stored value is automatically recalculated, reducing the risk of data discrepancies

Ready to go further?

Related questions