How to reference computed columns?

How can you specify a computed key? Is that another feature that is not added yet?

At the very basic you should be able to say:

table Users {
  id [pk]
  first_name string
  last_name string
  full_name string [ref: - (first_name, last_name)]
  
}

A more complex example useful for SQL generation is when you want to manipulate the columns in this computation? For example:

(ID int not null,
OrderNumber int not null,
OrderDate datetime not null,
UniqueOrderNumber AS 
(CONVERT(varchar(20),OrderNumber) + ':' + CONVERT(varchar(20),OrderDate,112))
)
1 Like