I would like to create a table that one of it's fields is calculated according to other fields. Is there a way to do it?
For example:
Field a - expirationDate
Field b - isDeleted
Field c should be the status and calculated as follows: if isDeleted=1 should be "deleted" if expirationDate < NOW() should be "expired" else should be "active".
User Profile
Collapse
-
Calculated fields in tables
-
How can I choose the db according to procedure parameter?
I would like to write a stored procedure that gets database name as parameter and use this parameter inside the procedure:
i.e. SELECT a from param_db.table1
It seems that I can't use a parameter instead of the db name. Is there a work around?
No activity results to display
Show More