Created
February 10, 2018 16:42
-
-
Save gabidavila/d33c85d4599f5d1cc1ca8a9741b6f467 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Virtual Column | |
ALTER TABLE `laps` | |
ADD COLUMN speed DOUBLE | |
GENERATED ALWAYS | |
AS (`distance` / `time`); | |
-- Stored Column | |
ALTER TABLE `laps` | |
ADD COLUMN speed DOUBLE | |
GENERATED ALWAYS | |
AS (`distance` / `time`) STORED; | |
-- Drop Column | |
ALTER TABLE `laps` | |
DROP COLUMN speed; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment