Inside my stored procedure, I would like to store the pilotActiveSinceTimestamp into the variable @myActiveSinceTS. If @myActiveSinceTS is null, I would like to update the pilotActiveSinceTimestamp to date(). What is the syntax to do this?
@myActiveSinceTS = select pilotActiveSinceTimestamp from pilot where pilotId = @pilotId ??
@myActiveSinceTS = select pilotActiveSinceTimestamp from pilot where pilotId = @pilotId ??