Created
July 11, 2017 18:21
-
-
Save suspecie/4ae8a758bb07e2b5240fdfb31a3556e2 to your computer and use it in GitHub Desktop.
script_tipo_registro
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
ALTER TABLE `InteractionModelMainData` | |
ADD COLUMN `fe_tipo_registro` BIGINT(18) NULL COMMENT 'tipo de registro do modelo de interacao Analitico - Sintetico' AFTER `tipo_registro`; | |
SELECT count(*) FROM InteractionModelMainData where tipo_registro = 'A'; | |
SELECT count(*) FROM InteractionModelMainData where tipo_registro = 'S'; | |
SELECT count(*) FROM InteractionModelMainData; | |
UPDATE InteractionModelMainData SET fe_tipo_registro = 1 where tipo_registro = 'A'; | |
UPDATE InteractionModelMainData SET fe_tipo_registro = 2 where tipo_registro = 'S'; | |
SELECT count(*) FROM InteractionModelMainData where fe_tipo_registro = 1; | |
SELECT count(*) FROM InteractionModelMainData where fe_tipo_registro = 2; | |
ALTER TABLE `InteractionModelMainData` | |
DROP COLUMN `tipo_registro`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment