Articles → SQL SERVER → Computed Columns In SQL Server

Computed Columns In SQL Server






Purpose





Example




Picture showing the table in design mode
Click to Enlarge





(case when [Age]>(18) then (1) else (0) end)


Picture showing the computed column added in the table
Click to Enlarge



Insert into Test (Age) values(19)



Output


Picture showing the output of computed columns in sql server
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, July 26, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250