Home » RDBMS Server » Server Administration » Does ora have a computed column?
Does ora have a computed column? [message #374375] Fri, 08 June 2001 11:26
Naveen
Messages: 75
Registered: June 2001
Member
IN sqlserver:
CREATE TABLE test
(
expiry_date DATETIME,
expired AS (case when (expiry_date < GETDATE()) then 1 else 0
end)
)

The column expired is a computed column. It gets updated with the appros value when
1. when a row has been inserted or updated
2. on a select stmt => re evaluates the column and then returns the result set.

This way if the expiry_date at the time of creation was say for next day, then the value of expired column is 0. But this value is automatically changed when the select query is run the next day.

Does oracle have something like this?
Previous Topic: BFILES datatype
Next Topic: NORMSDIST Function
Goto Forum:
  


Current Time: Fri Jul 05 17:15:56 CDT 2024