I have a table where I would like to select certain columns and then create transformed columns based on that selection. Due to security reasons, I'm not able to create a new table and thought there may be a way to SELECT and ALTER in the same statement.
My statement below runs, but the column is not produced. Am I doing something wrong/is this approach not possible? Is there a better approach?
SELECT * col1,col2,col3 FROM db
AS db2
ALTER TABLE db2 ADD col4 AS (transformation) PERSISTED
Guidance and recommendation is appreciated.