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)




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