Announcing GA for Azure Container Apps Serverless GPUs
March 19, 2025The Marketplace Partner Digest | March 2025
March 19, 2025This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.
Section: Development
Level: Medium
Question:
You add a computed column to an existing table.
You then select from the table.
When is the value of the computed column calculated i.e., when the value is inserted or updated, or when the value is selected?
Answer:
By default, the value is calculated when the value is selected.
However, if the PERSISTED keyword is added to the computed column, the value is calculated when it is inserted or updated.
The post SQL Interview: #28 When computed columns are calculated in SQL Server appeared first on The Bit Bucket.